From 19e1100c153f8eae142ce2ef059d6322f54d8116 Mon Sep 17 00:00:00 2001 From: Michael Achenbach Date: Tue, 13 Mar 2018 15:04:27 +0100 Subject: [PATCH] [build] Don't generate snapshot.cc with external startup data Bug: v8:7441 Change-Id: I4dda34f22a1281c869fdf7b31108908f834ab30c Reviewed-on: https://chromium-review.googlesource.com/960034 Reviewed-by: Yang Guo Reviewed-by: Jakob Gruber Commit-Queue: Michael Achenbach Cr-Commit-Position: refs/heads/master@{#51957} --- BUILD.gn | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 209f0c1d04..70aaf9073c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -820,24 +820,17 @@ if (v8_use_snapshot) { sources = [] - outputs = [ - "$target_gen_dir/snapshot.cc", - ] - - if (v8_enable_embedded_builtins) { - outputs += [ "$target_gen_dir/embedded.cc" ] - } + outputs = [] args = [ "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)", "root_out_dir") + "/mksnapshot", root_build_dir), "--turbo_instruction_scheduling", - "--startup_src", - rebase_path("$target_gen_dir/snapshot.cc", root_build_dir), ] if (v8_enable_embedded_builtins) { + outputs += [ "$target_gen_dir/embedded.cc" ] args += [ "--embedded_src", rebase_path("$target_gen_dir/embedded.cc", root_build_dir), @@ -868,6 +861,12 @@ if (v8_use_snapshot) { "--startup_blob", rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir), ] + } else { + outputs += [ "$target_gen_dir/snapshot.cc" ] + args += [ + "--startup_src", + rebase_path("$target_gen_dir/snapshot.cc", root_build_dir), + ] } if (v8_embed_script != "") { @@ -971,7 +970,7 @@ v8_source_set("v8_nosnapshot") { configs = [ ":internal_config" ] } -if (v8_use_snapshot) { +if (v8_use_snapshot && !v8_use_external_startup_data) { v8_source_set("v8_snapshot") { # Only targets in this file and the top-level visibility target can # depend on this. @@ -1017,7 +1016,7 @@ if (v8_use_snapshot) { } } -if (v8_use_external_startup_data) { +if (v8_use_snapshot && v8_use_external_startup_data) { v8_source_set("v8_external_snapshot") { visibility = [ ":*" ] # Only targets in this file can depend on this.