From 50234460f9c39f50504fcef067ad0730eca65414 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Tue, 23 Apr 2019 22:21:52 +0800 Subject: [PATCH] build: disable custom v8 snapshot by default This currently breaks `test/pummel/test-hash-seed.js` PR-URL: https://github.com/nodejs/node/pull/27365 Refs: https://github.com/nodejs/node/pull/27321 Reviewed-By: Refael Ackermann Reviewed-By: Ujjwal Sharma --- configure.py | 12 ++++++++++++ node.gyp | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/configure.py b/configure.py index 1a0819e74113bc..12d68ccfeb2419 100755 --- a/configure.py +++ b/configure.py @@ -421,6 +421,11 @@ dest='with_ltcg', help='Use Link Time Code Generation. This feature is only available on Windows.') +parser.add_option('--with-node-snapshot', + action='store_true', + dest='with_node_snapshot', + help='Turn on V8 snapshot integration. Currently experimental.') + intl_optgroup.add_option('--download', action='store', dest='download_list', @@ -928,6 +933,13 @@ def configure_node(o): o['variables']['want_separate_host_toolset'] = int( cross_compiling and want_snapshots) + if options.with_node_snapshot: + o['variables']['node_use_node_snapshot'] = 'true' + else: + # Default to false for now. + # TODO(joyeecheung): enable it once we fix the hashseed uniqueness + o['variables']['node_use_node_snapshot'] = 'false' + if target_arch == 'arm': configure_arm(o) diff --git a/node.gyp b/node.gyp index 82efba25d62efa..53bd954afb3e39 100644 --- a/node.gyp +++ b/node.gyp @@ -6,6 +6,7 @@ 'node_use_dtrace%': 'false', 'node_use_etw%': 'false', 'node_no_browser_globals%': 'false', + 'node_use_node_snapshot%': 'false', 'node_use_v8_platform%': 'true', 'node_use_bundled_v8%': 'true', 'node_shared%': 'false', @@ -431,7 +432,7 @@ 'src/node_code_cache_stub.cc' ], }], - ['want_separate_host_toolset==0', { + ['node_use_node_snapshot=="true"', { 'dependencies': [ 'node_mksnapshot', ],