Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: runtime/tools/create_snapshot_bin.py

Issue 2692223002: Teach gen_snapshot how to create script snapshots if given a core snapshot to create them against. (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/gen_snapshot.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/tools/create_snapshot_bin.py
diff --git a/runtime/tools/create_snapshot_bin.py b/runtime/tools/create_snapshot_bin.py
index 81f35aad0c9c050c7e2cd0b9e07fc623daac33c0..7fd77e6f1ab7f6170629cb9de60ff8d5d2cf3dff 100755
--- a/runtime/tools/create_snapshot_bin.py
+++ b/runtime/tools/create_snapshot_bin.py
@@ -24,11 +24,15 @@ def BuildOptions():
result.add_option("--executable",
action="store", type="string",
help="path to snapshot generator executable")
+ result.add_option("--snapshot_kind",
+ action="store", type="string",
+ help="kind of snapshot to generate",
+ default="core")
result.add_option("--vm_output_bin",
action="store", type="string",
help="output file name into which vm isolate snapshot in binary form " +
"is generated")
- result.add_option("--output_bin",
+ result.add_option("--isolate_output_bin",
action="store", type="string",
help="output file name into which isolate snapshot in binary form " +
"is generated")
@@ -69,11 +73,14 @@ def ProcessOptions(options):
if not options.executable:
sys.stderr.write('--executable not specified\n')
return False
+ if not options.snapshot_kind:
+ sys.stderr.write('--snapshot_kind not specified\n')
+ return False
if not options.vm_output_bin:
sys.stderr.write('--vm_output_bin not specified\n')
return False
- if not options.output_bin:
- sys.stderr.write('--output_bin not specified\n')
+ if not options.isolate_output_bin:
+ sys.stderr.write('--isolate_output_bin not specified\n')
return False
if options.abi and not options.target_os == 'android':
sys.stderr.write('--abi requires --target_os android\n')
@@ -116,8 +123,9 @@ def Main():
script_args.append(''.join([ "--packages=", options.packages]))
# First setup the vm isolate and regular isolate snapshot output filename.
+ script_args.append(''.join([ "--snapshot_kind=", options.snapshot_kind ]))
script_args.append(''.join([ "--vm_snapshot_data=", options.vm_output_bin ]))
- script_args.append(''.join([ "--isolate_snapshot_data=", options.output_bin ]))
+ script_args.append(''.join([ "--isolate_snapshot_data=", options.isolate_output_bin ]))
# Specify the embedder entry points snapshot
if options.embedder_entry_points_manifest:
« no previous file with comments | « runtime/bin/gen_snapshot.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698