Index: runtime/bin/BUILD.gn |
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn |
index 4f30948dc15643e0f1ae14c7252faf25a859d2d0..656e3011f2ade66882e7efd1d1e979ce9c4abbb6 100644 |
--- a/runtime/bin/BUILD.gn |
+++ b/runtime/bin/BUILD.gn |
@@ -460,15 +460,25 @@ 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, |
] |
+ snapshot_kind = "core" |
+ |
+ # Putting code in the core snapshot breaks tests that use non-default flags. |
+ # snapshot_kind = "core-jit" |
+ |
gen_snapshot_dir = |
get_label_info("../bin:gen_snapshot($host_toolchain)", "root_out_dir") |
@@ -477,13 +487,15 @@ action("generate_snapshot_bin") { |
"--executable", |
rebase_path("$gen_snapshot_dir/gen_snapshot"), |
"--snapshot_kind", |
- "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), |
] |
@@ -529,15 +541,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 |
@@ -547,15 +561,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 |