OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Because standalone V8 builds are not supported, assume this is part of a | 5 # Because standalone V8 builds are not supported, assume this is part of a |
6 # Chromium build. | 6 # Chromium build. |
7 import("//build/module_args/v8.gni") | 7 import("//build/module_args/v8.gni") |
8 | 8 |
9 # TODO(jochen): These will need to be user-settable to support standalone V8 | 9 # TODO(jochen): These will need to be user-settable to support standalone V8 |
10 # builds. | 10 # builds. |
11 v8_deprecation_warnings = false | 11 v8_deprecation_warnings = false |
12 v8_enable_disassembler = false | 12 v8_enable_disassembler = false |
13 v8_enable_gdbjit = false | 13 v8_enable_gdbjit = false |
14 v8_enable_handle_zapping = true | 14 v8_enable_handle_zapping = true |
15 v8_enable_i18n_support = true | 15 v8_enable_i18n_support = true |
16 v8_enable_verify_heap = false | 16 v8_enable_verify_heap = false |
17 v8_interpreted_regexp = false | 17 v8_interpreted_regexp = false |
18 v8_object_print = false | 18 v8_object_print = false |
19 v8_postmortem_support = false | 19 v8_postmortem_support = false |
20 v8_use_snapshot = true | 20 v8_use_snapshot = true |
| 21 |
| 22 # TODO(GYP): We should be just target_cpu and not need v8_target_arch. |
21 v8_target_arch = current_cpu | 23 v8_target_arch = current_cpu |
| 24 |
22 v8_random_seed = "314159265" | 25 v8_random_seed = "314159265" |
23 v8_toolset_for_d8 = "host" | 26 v8_toolset_for_d8 = "host" |
24 | 27 |
| 28 # The snapshot needs to be compiled for the host, but compiled with |
| 29 # a toolchain that matches the bit-width of the target. |
| 30 # |
| 31 # TODO(GYP): For now we only support 32-bit little-endian target builds from |
| 32 # an x86/x64 Linux host. Eventually we need to support all of the |
| 33 # host/target configurations v8 runs on. |
| 34 if (target_os == "android" || target_os == "chromeos") { |
| 35 assert(host_os == "linux" && |
| 36 (host_cpu == "x86" || host_cpu == "x64") && |
| 37 (target_cpu == "arm" || target_cpu == "mipsel" || target_cpu == "x86")) |
| 38 snapshot_toolchain = "//build/toolchain/linux:clang_x86" |
| 39 } else { |
| 40 snapshot_toolchain = default_toolchain |
| 41 } |
| 42 |
25 ############################################################################### | 43 ############################################################################### |
26 # Configurations | 44 # Configurations |
27 # | 45 # |
28 config("internal_config") { | 46 config("internal_config") { |
29 visibility = [ ":*" ] # Only targets in this file can depend on this. | 47 visibility = [ ":*" ] # Only targets in this file can depend on this. |
30 | 48 |
31 include_dirs = [ "." ] | 49 include_dirs = [ "." ] |
32 | 50 |
33 if (component_mode == "shared_library") { | 51 if (component_mode == "shared_library") { |
34 defines = [ | 52 defines = [ |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 ] | 333 ] |
316 | 334 |
317 args = rebase_path(outputs, root_build_dir) + | 335 args = rebase_path(outputs, root_build_dir) + |
318 rebase_path(sources, root_build_dir) | 336 rebase_path(sources, root_build_dir) |
319 } | 337 } |
320 | 338 |
321 action("run_mksnapshot") { | 339 action("run_mksnapshot") { |
322 visibility = [ ":*" ] # Only targets in this file can depend on this. | 340 visibility = [ ":*" ] # Only targets in this file can depend on this. |
323 | 341 |
324 deps = [ | 342 deps = [ |
325 ":mksnapshot($host_toolchain)", | 343 ":mksnapshot($snapshot_toolchain)", |
326 ] | 344 ] |
327 | 345 |
328 script = "tools/run.py" | 346 script = "tools/run.py" |
329 | 347 |
330 outputs = [ | 348 outputs = [ |
331 "$target_gen_dir/snapshot.cc", | 349 "$target_gen_dir/snapshot.cc", |
332 ] | 350 ] |
333 | 351 |
334 args = [ | 352 args = [ |
335 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", | 353 "./" + rebase_path(get_label_info(":mksnapshot($snapshot_toolchain)", |
336 "root_out_dir") + "/mksnapshot", | 354 "root_out_dir") + "/mksnapshot", |
337 root_build_dir), | 355 root_build_dir), |
338 "--log-snapshot-positions", | 356 "--log-snapshot-positions", |
339 "--logfile", | 357 "--logfile", |
340 rebase_path("$target_gen_dir/snapshot.log", root_build_dir), | 358 rebase_path("$target_gen_dir/snapshot.log", root_build_dir), |
341 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir), | 359 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir), |
342 ] | 360 ] |
343 | 361 |
344 if (v8_random_seed != "0") { | 362 if (v8_random_seed != "0") { |
345 args += [ | 363 args += [ |
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 | 1439 |
1422 deps = [ | 1440 deps = [ |
1423 ":v8_libbase", | 1441 ":v8_libbase", |
1424 ] | 1442 ] |
1425 } | 1443 } |
1426 | 1444 |
1427 ############################################################################### | 1445 ############################################################################### |
1428 # Executables | 1446 # Executables |
1429 # | 1447 # |
1430 | 1448 |
1431 if (current_toolchain == host_toolchain) { | 1449 if (current_toolchain == snapshot_toolchain) { |
1432 executable("mksnapshot") { | 1450 executable("mksnapshot") { |
1433 visibility = [ ":*" ] # Only targets in this file can depend on this. | 1451 visibility = [ ":*" ] # Only targets in this file can depend on this. |
1434 | 1452 |
1435 sources = [ | 1453 sources = [ |
1436 "src/mksnapshot.cc", | 1454 "src/mksnapshot.cc", |
1437 ] | 1455 ] |
1438 | 1456 |
1439 configs -= [ "//build/config/compiler:chromium_code" ] | 1457 configs -= [ "//build/config/compiler:chromium_code" ] |
1440 configs += [ "//build/config/compiler:no_chromium_code" ] | 1458 configs += [ "//build/config/compiler:no_chromium_code" ] |
1441 configs += [ | 1459 configs += [ |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 sources += [ | 1575 sources += [ |
1558 "src/d8-debug.cc", | 1576 "src/d8-debug.cc", |
1559 "$target_gen_dir/d8-js.cc", | 1577 "$target_gen_dir/d8-js.cc", |
1560 ] | 1578 ] |
1561 } | 1579 } |
1562 if (v8_enable_i18n_support) { | 1580 if (v8_enable_i18n_support) { |
1563 deps += [ "//third_party/icu" ] | 1581 deps += [ "//third_party/icu" ] |
1564 } | 1582 } |
1565 } | 1583 } |
1566 } | 1584 } |
OLD | NEW |