Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: re-enable custom V8 snapshot by default #28181

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,10 @@
dest='with_ltcg',
help='Use Link Time Code Generation. This feature is only available on Windows.')

parser.add_option('--with-node-snapshot',
parser.add_option('--without-node-snapshot',
action='store_true',
dest='with_node_snapshot',
help='Turn on V8 snapshot integration. Currently experimental.')
dest='without_node_snapshot',
help='Turn off V8 snapshot integration. Currently experimental.')

intl_optgroup.add_option('--download',
action='store',
Expand Down Expand Up @@ -940,11 +940,9 @@ 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'
if not options.without_node_snapshot:
o['variables']['node_use_node_snapshot'] = b(not cross_compiling)
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':
Expand Down
1 change: 1 addition & 0 deletions tools/snapshot/snapshot_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ std::string SnapshotBuilder::Generate(
// Must be out of HandleScope
StartupData blob =
creator.CreateBlob(SnapshotCreator::FunctionCodeHandling::kClear);
CHECK(blob.CanBeRehashed());
// Must be done while the snapshot creator isolate is entered i.e. the
// creator is still alive.
main_instance->Dispose();
Expand Down