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. | |
Nico
2015/03/11 13:47:48
this reads grammared incorrectly
jochen (gone - plz use gerrit)
2015/03/11 16:10:30
also, we want to be able to e.g. compile for linux
Dirk Pranke
2015/03/11 16:53:30
Will fix :).
| |
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 # TODO(GYP): For now we only support 32-bit little-endian builds from | |
31 # an x86/x64 Linux host. We need to support the other architectures as well. | |
32 if (target_os == "android" || target_os == "chromeos") { | |
jochen (gone - plz use gerrit)
2015/03/11 16:10:30
why this restriction?
Dirk Pranke
2015/03/11 16:53:30
I'm not sure I understand the question. Which rest
jochen (gone - plz use gerrit)
2015/03/11 18:32:28
ok, maybe add a comment then that this is supposed
Dirk Pranke
2015/03/11 18:56:10
That was the intent of the comment on lines 30-31,
jochen (gone - plz use gerrit)
2015/03/11 18:58:14
ah, that's probably enough. Maybe architectures/OS
| |
33 assert(host_os == "linux" && | |
34 (host_cpu == "x86" || host_cpu == "x64") && | |
35 (target_cpu == "arm" || target_cpu == "mipsel" || target_cpu == "x86")) | |
36 snapshot_toolchain = "//build/toolchain/linux:clang_x86" | |
37 } else { | |
38 snapshot_toolchain = default_toolchain | |
39 } | |
40 | |
25 ############################################################################### | 41 ############################################################################### |
26 # Configurations | 42 # Configurations |
27 # | 43 # |
28 config("internal_config") { | 44 config("internal_config") { |
29 visibility = [ ":*" ] # Only targets in this file can depend on this. | 45 visibility = [ ":*" ] # Only targets in this file can depend on this. |
30 | 46 |
31 include_dirs = [ "." ] | 47 include_dirs = [ "." ] |
32 | 48 |
33 if (component_mode == "shared_library") { | 49 if (component_mode == "shared_library") { |
34 defines = [ | 50 defines = [ |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
315 ] | 331 ] |
316 | 332 |
317 args = rebase_path(outputs, root_build_dir) + | 333 args = rebase_path(outputs, root_build_dir) + |
318 rebase_path(sources, root_build_dir) | 334 rebase_path(sources, root_build_dir) |
319 } | 335 } |
320 | 336 |
321 action("run_mksnapshot") { | 337 action("run_mksnapshot") { |
322 visibility = [ ":*" ] # Only targets in this file can depend on this. | 338 visibility = [ ":*" ] # Only targets in this file can depend on this. |
323 | 339 |
324 deps = [ | 340 deps = [ |
325 ":mksnapshot($host_toolchain)", | 341 ":mksnapshot($snapshot_toolchain)", |
326 ] | 342 ] |
327 | 343 |
328 script = "tools/run.py" | 344 script = "tools/run.py" |
329 | 345 |
330 outputs = [ | 346 outputs = [ |
331 "$target_gen_dir/snapshot.cc", | 347 "$target_gen_dir/snapshot.cc", |
332 ] | 348 ] |
333 | 349 |
334 args = [ | 350 args = [ |
335 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", | 351 "./" + rebase_path(get_label_info(":mksnapshot($snapshot_toolchain)", |
336 "root_out_dir") + "/mksnapshot", | 352 "root_out_dir") + "/mksnapshot", |
337 root_build_dir), | 353 root_build_dir), |
338 "--log-snapshot-positions", | 354 "--log-snapshot-positions", |
339 "--logfile", | 355 "--logfile", |
340 rebase_path("$target_gen_dir/snapshot.log", root_build_dir), | 356 rebase_path("$target_gen_dir/snapshot.log", root_build_dir), |
341 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir), | 357 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir), |
342 ] | 358 ] |
343 | 359 |
344 if (v8_random_seed != "0") { | 360 if (v8_random_seed != "0") { |
345 args += [ | 361 args += [ |
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1421 | 1437 |
1422 deps = [ | 1438 deps = [ |
1423 ":v8_libbase", | 1439 ":v8_libbase", |
1424 ] | 1440 ] |
1425 } | 1441 } |
1426 | 1442 |
1427 ############################################################################### | 1443 ############################################################################### |
1428 # Executables | 1444 # Executables |
1429 # | 1445 # |
1430 | 1446 |
1431 if (current_toolchain == host_toolchain) { | 1447 if (current_toolchain == snapshot_toolchain) { |
1432 executable("mksnapshot") { | 1448 executable("mksnapshot") { |
1433 visibility = [ ":*" ] # Only targets in this file can depend on this. | 1449 visibility = [ ":*" ] # Only targets in this file can depend on this. |
1434 | 1450 |
1435 sources = [ | 1451 sources = [ |
1436 "src/mksnapshot.cc", | 1452 "src/mksnapshot.cc", |
1437 ] | 1453 ] |
1438 | 1454 |
1439 configs -= [ "//build/config/compiler:chromium_code" ] | 1455 configs -= [ "//build/config/compiler:chromium_code" ] |
1440 configs += [ "//build/config/compiler:no_chromium_code" ] | 1456 configs += [ "//build/config/compiler:no_chromium_code" ] |
1441 configs += [ | 1457 configs += [ |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1557 sources += [ | 1573 sources += [ |
1558 "src/d8-debug.cc", | 1574 "src/d8-debug.cc", |
1559 "$target_gen_dir/d8-js.cc", | 1575 "$target_gen_dir/d8-js.cc", |
1560 ] | 1576 ] |
1561 } | 1577 } |
1562 if (v8_enable_i18n_support) { | 1578 if (v8_enable_i18n_support) { |
1563 deps += [ "//third_party/icu" ] | 1579 deps += [ "//third_party/icu" ] |
1564 } | 1580 } |
1565 } | 1581 } |
1566 } | 1582 } |
OLD | NEW |