Index: runtime/bin/BUILD.gn |
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn |
index cde7664bd959f2fb159d3f1421e6a6371bff1fbc..d695f1ad91431376e7af3b1857fbdededcf73913 100644 |
--- a/runtime/bin/BUILD.gn |
+++ b/runtime/bin/BUILD.gn |
@@ -489,43 +489,81 @@ action("generate_snapshot_bin") { |
] |
} |
-action("generate_snapshot_file") { |
+template("bin_to_assembly") { |
zra
2017/05/24 16:20:24
Please add comment describing what this does, and
rmacnak
2017/05/24 19:26:45
Done.
|
+ action(target_name) { |
+ deps = invoker.deps |
zra
2017/05/24 16:20:24
Assert that this is defined.
|
+ script = "../tools/bin_to_assembly.py" |
+ args = [ |
+ "--input", |
+ rebase_path(invoker.input), |
zra
2017/05/24 16:20:24
ditto
|
+ "--output", |
+ rebase_path(invoker.output), |
zra
2017/05/24 16:20:24
ditto
|
+ "--symbol_name", |
+ invoker.symbol, |
zra
2017/05/24 16:20:24
ditto
|
+ "--target_os", |
+ target_os, |
+ ] |
+ if (invoker.executable) { |
zra
2017/05/24 16:20:24
ditto
|
+ args += [ "--executable" ] |
+ } |
+ inputs = [ |
+ script, |
+ invoker.input, |
+ ] |
+ outputs = [ |
+ invoker.output, |
+ ] |
+ } |
+} |
+ |
+bin_to_assembly("vm_snapshot_data_assembly") { |
deps = [ |
":generate_snapshot_bin", |
] |
+ input = "$target_gen_dir/vm_isolate_snapshot.bin" |
+ output = "$target_gen_dir/vm_snapshot_data.S" |
+ symbol = "kDartVmSnapshotData" |
+ executable = false |
+} |
- snapshot_in_cc_file = "snapshot_in.cc" |
- inputs = [ |
- "../tools/create_snapshot_file.py", |
- snapshot_in_cc_file, |
- "$target_gen_dir/vm_isolate_snapshot.bin", |
- "$target_gen_dir/isolate_snapshot.bin", |
- ] |
- output = "$root_gen_dir/dart_snapshot.cc" |
- outputs = [ |
- output, |
- ] |
+bin_to_assembly("vm_snapshot_instructions_assembly") { |
+ deps = [] |
+ input = "../tools/empty.bin" |
+ output = "$target_gen_dir/vm_snapshot_instructions.S" |
+ symbol = "kDartVmSnapshotInstructions" |
+ executable = true |
+} |
- script = "../tools/create_snapshot_file.py" |
- args = [ |
- "--vm_input_bin", |
- rebase_path("$target_gen_dir/vm_isolate_snapshot.bin"), |
- "--input_bin", |
- rebase_path("$target_gen_dir/isolate_snapshot.bin"), |
- "--input_cc", |
- rebase_path(snapshot_in_cc_file), |
- "--output", |
- rebase_path(output), |
+bin_to_assembly("isolate_snapshot_data_assembly") { |
+ deps = [ |
+ ":generate_snapshot_bin", |
] |
+ input = "$target_gen_dir/isolate_snapshot.bin" |
+ output = "$target_gen_dir/isolate_snapshot_data.S" |
+ symbol = "kDartCoreIsolateSnapshotData" |
+ executable = false |
} |
-source_set("dart_snapshot_cc") { |
- sources = [ |
- "$root_gen_dir/dart_snapshot.cc", |
- ] |
+bin_to_assembly("isolate_snapshot_instructions_assembly") { |
+ deps = [] |
+ input = "../tools/empty.bin" |
+ output = "$target_gen_dir/isolate_snapshot_instructions.S" |
+ symbol = "kDartCoreIsolateSnapshotInstructions" |
+ executable = true |
+} |
+source_set("dart_snapshot_cc") { |
deps = [ |
- ":generate_snapshot_file", |
+ ":isolate_snapshot_data_assembly", |
+ ":isolate_snapshot_instructions_assembly", |
+ ":vm_snapshot_data_assembly", |
+ ":vm_snapshot_instructions_assembly", |
+ ] |
+ sources = [ |
+ "$target_gen_dir/isolate_snapshot_data.S", |
+ "$target_gen_dir/isolate_snapshot_instructions.S", |
+ "$target_gen_dir/vm_snapshot_data.S", |
+ "$target_gen_dir/vm_snapshot_instructions.S", |
] |
} |