Index: runtime/bin/BUILD.gn |
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn |
index 3a764f0be5e89e5c9da589e3c2e9e123770a9852..149ec75d5e8bf2a06b10a045f87a1682ea0cd0d5 100644 |
--- a/runtime/bin/BUILD.gn |
+++ b/runtime/bin/BUILD.gn |
@@ -6,6 +6,13 @@ import("gypi_contents.gni") |
import("../runtime_args.gni") |
import("../../build/compiled_action.gni") |
+declare_args() { |
+ # Controls the kind of core snapshot linked into the standalone VM. Using a |
+ # core-jit snapshot breaks the ability to change various flags that affect |
+ # code generation. |
+ dart_core_snapshot_kind = "core" |
+} |
+ |
# Generate a resources.cc file for the service isolate without Observatory. |
action("gen_resources_cc") { |
visibility = [ ":*" ] # Only targets in this file can see this. |
@@ -462,12 +469,17 @@ action("generate_snapshot_bin") { |
"../bin:gen_snapshot($host_toolchain)", |
] |
- vm_isolate_snapshot = "$target_gen_dir/vm_isolate_snapshot.bin" |
- isolate_snapshot = "$target_gen_dir/isolate_snapshot.bin" |
+ vm_snapshot_data = "$target_gen_dir/vm_snapshot_data.bin" |
+ vm_snapshot_instructions = "$target_gen_dir/vm_snapshot_instructions.bin" |
+ isolate_snapshot_data = "$target_gen_dir/isolate_snapshot_data.bin" |
+ isolate_snapshot_instructions = |
+ "$target_gen_dir/isolate_snapshot_instructions.bin" |
gen_snapshot_stamp_file = "$target_gen_dir/gen_snapshot.stamp" |
outputs = [ |
- vm_isolate_snapshot, |
- isolate_snapshot, |
+ vm_snapshot_data, |
+ vm_snapshot_instructions, |
+ isolate_snapshot_data, |
+ isolate_snapshot_instructions, |
gen_snapshot_stamp_file, |
] |
@@ -479,13 +491,15 @@ action("generate_snapshot_bin") { |
"--executable", |
rebase_path("$gen_snapshot_dir/gen_snapshot"), |
"--snapshot_kind", |
- "core", |
+ dart_core_snapshot_kind, |
"--vm_output_bin", |
- rebase_path(vm_isolate_snapshot, root_build_dir), |
+ rebase_path(vm_snapshot_data, root_build_dir), |
+ "--vm_instructions_output_bin", |
+ rebase_path(vm_snapshot_instructions, root_build_dir), |
"--isolate_output_bin", |
- rebase_path(isolate_snapshot, root_build_dir), |
- "--target_os", |
- current_os, |
+ rebase_path(isolate_snapshot_data, root_build_dir), |
+ "--isolate_instructions_output_bin", |
+ rebase_path(isolate_snapshot_instructions, root_build_dir), |
"--timestamp_file", |
rebase_path(gen_snapshot_stamp_file, root_build_dir), |
] |
@@ -531,15 +545,17 @@ bin_to_assembly("vm_snapshot_data_assembly") { |
deps = [ |
":generate_snapshot_bin", |
] |
- input = "$target_gen_dir/vm_isolate_snapshot.bin" |
+ input = "$target_gen_dir/vm_snapshot_data.bin" |
output = "$target_gen_dir/vm_snapshot_data.S" |
symbol = "kDartVmSnapshotData" |
executable = false |
} |
bin_to_assembly("vm_snapshot_instructions_assembly") { |
- deps = [] |
- input = "../tools/empty.bin" |
+ deps = [ |
+ ":generate_snapshot_bin", |
+ ] |
+ input = "$target_gen_dir/vm_snapshot_instructions.bin" |
output = "$target_gen_dir/vm_snapshot_instructions.S" |
symbol = "kDartVmSnapshotInstructions" |
executable = true |
@@ -549,15 +565,17 @@ bin_to_assembly("isolate_snapshot_data_assembly") { |
deps = [ |
":generate_snapshot_bin", |
] |
- input = "$target_gen_dir/isolate_snapshot.bin" |
+ input = "$target_gen_dir/isolate_snapshot_data.bin" |
output = "$target_gen_dir/isolate_snapshot_data.S" |
symbol = "kDartCoreIsolateSnapshotData" |
executable = false |
} |
bin_to_assembly("isolate_snapshot_instructions_assembly") { |
- deps = [] |
- input = "../tools/empty.bin" |
+ deps = [ |
+ ":generate_snapshot_bin", |
+ ] |
+ input = "$target_gen_dir/isolate_snapshot_instructions.bin" |
output = "$target_gen_dir/isolate_snapshot_instructions.S" |
symbol = "kDartCoreIsolateSnapshotInstructions" |
executable = true |