summaryrefslogtreecommitdiffstats
path: root/tools/gypv8sh.py
diff options
context:
space:
mode:
authorbaixo <baixo@chromium.org>2014-10-28 04:52:21 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-28 11:52:42 +0000
commit3a3c88a61fc3fc5b001e7bae70e6335d3cf7c997 (patch)
tree0840a2647c5c2eda9a92ad9ffd2a45adbed9379e /tools/gypv8sh.py
parentfb8875c804337e452e7f799bc3960b912100e5a9 (diff)
downloadchromium_src-3a3c88a61fc3fc5b001e7bae70e6335d3cf7c997.zip
chromium_src-3a3c88a61fc3fc5b001e7bae70e6335d3cf7c997.tar.gz
chromium_src-3a3c88a61fc3fc5b001e7bae70e6335d3cf7c997.tar.bz2
Infrastructure for enabling V8's initial snapshot to be loaded from external files as opposed to being statically linked to the binary.
This is not currently supported on any architecture. BUG=421063 Review URL: https://codereview.chromium.org/594603003 Cr-Commit-Position: refs/heads/master@{#301595}
Diffstat (limited to 'tools/gypv8sh.py')
-rwxr-xr-xtools/gypv8sh.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/gypv8sh.py b/tools/gypv8sh.py
index 3f81a8b..9724ed4 100755
--- a/tools/gypv8sh.py
+++ b/tools/gypv8sh.py
@@ -26,6 +26,8 @@ def main ():
parser.add_option('--deps_js', action="store",
help=("Path to deps.js for dependency resolution, " +
"optional."))
+ parser.add_option('--external', action='store',
+ help="Load V8's initial snapshot from external files (y/n)")
(opts, args) = parser.parse_args()
if len(args) != 9:
@@ -36,6 +38,12 @@ def main ():
icudatafile = os.path.join(os.path.dirname(v8_shell), 'icudtl.dat')
if os.path.exists(icudatafile):
cmd.extend(['--icu-data-file=%s' % icudatafile])
+ v8nativesfile = os.path.join(os.path.dirname(v8_shell), 'natives_blob.bin')
+ if opts.external == 'y' and os.path.exists(v8nativesfile):
+ cmd.extend(['--natives_blob=%s' % v8nativesfile])
+ v8snapshotfile = os.path.join(os.path.dirname(v8_shell), 'snapshot_blob.bin')
+ if opts.external == 'y' and os.path.exists(v8snapshotfile):
+ cmd.extend(['--snapshot_blob=%s' % v8snapshotfile])
arguments = [js2webui, inputfile, inputrelfile, opts.deps_js,
cxxoutfile, test_type]
cmd.extend(['-e', "arguments=" + json.dumps(arguments), mock_js,