Chromium Code Reviews| Index: BUILD.gn |
| diff --git a/BUILD.gn b/BUILD.gn |
| index 81e6fef0ced26530e6b7b346f550a3b0bd8694c6..f838262498e4a363282a3e2b0d0818df2112f21e 100644 |
| --- a/BUILD.gn |
| +++ b/BUILD.gn |
| @@ -18,10 +18,26 @@ v8_interpreted_regexp = false |
| v8_object_print = false |
| v8_postmortem_support = false |
| v8_use_snapshot = true |
| + |
| +# 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 :).
|
| v8_target_arch = current_cpu |
| + |
| v8_random_seed = "314159265" |
| v8_toolset_for_d8 = "host" |
| +# The snapshot needs to be compiled for the host, but compiled with |
| +# a toolchain that matches the bit-width of the target. |
| +# TODO(GYP): For now we only support 32-bit little-endian builds from |
| +# an x86/x64 Linux host. We need to support the other architectures as well. |
| +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
|
| + assert(host_os == "linux" && |
| + (host_cpu == "x86" || host_cpu == "x64") && |
| + (target_cpu == "arm" || target_cpu == "mipsel" || target_cpu == "x86")) |
| + snapshot_toolchain = "//build/toolchain/linux:clang_x86" |
| +} else { |
| + snapshot_toolchain = default_toolchain |
| +} |
| + |
| ############################################################################### |
| # Configurations |
| # |
| @@ -322,7 +338,7 @@ action("run_mksnapshot") { |
| visibility = [ ":*" ] # Only targets in this file can depend on this. |
| deps = [ |
| - ":mksnapshot($host_toolchain)", |
| + ":mksnapshot($snapshot_toolchain)", |
| ] |
| script = "tools/run.py" |
| @@ -332,7 +348,7 @@ action("run_mksnapshot") { |
| ] |
| args = [ |
| - "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", |
| + "./" + rebase_path(get_label_info(":mksnapshot($snapshot_toolchain)", |
| "root_out_dir") + "/mksnapshot", |
| root_build_dir), |
| "--log-snapshot-positions", |
| @@ -1428,7 +1444,7 @@ source_set("v8_libplatform") { |
| # Executables |
| # |
| -if (current_toolchain == host_toolchain) { |
| +if (current_toolchain == snapshot_toolchain) { |
| executable("mksnapshot") { |
| visibility = [ ":*" ] # Only targets in this file can depend on this. |