Skip to content

Commit ef88b53

Browse files
legendecasaduh95
authored andcommitted
build: build codecache and snapshot with libnode
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net> PR-URL: #63626 Backport-PR-URL: #64632 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 70ebe66 commit ef88b53

2 files changed

Lines changed: 153 additions & 104 deletions

File tree

configure.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ def configure_node_lib_files(o):
16211621
o['variables']['node_library_files'] = SearchFiles('lib', 'js')
16221622

16231623
def configure_node_cctest_sources(o):
1624-
o['variables']['node_cctest_sources'] = [ 'src/node_snapshot_stub.cc' ] + \
1624+
o['variables']['node_cctest_sources'] = [] + \
16251625
SearchFiles('test/cctest', 'cc') + \
16261626
SearchFiles('test/cctest', 'h')
16271627

@@ -1676,10 +1676,6 @@ def configure_node(o):
16761676
o['variables']['arm_fpu'] = options.arm_fpu or 'neon'
16771677

16781678
if options.node_snapshot_main is not None:
1679-
if options.shared:
1680-
# This should be possible to fix, but we will need to refactor the
1681-
# libnode target to avoid building it twice.
1682-
error('--node-snapshot-main is incompatible with --shared')
16831679
if options.without_node_snapshot:
16841680
error('--node-snapshot-main is incompatible with ' +
16851681
'--without-node-snapshot')
@@ -1690,17 +1686,15 @@ def configure_node(o):
16901686
if options.without_node_snapshot or options.node_builtin_modules_path:
16911687
o['variables']['node_use_node_snapshot'] = 'false'
16921688
else:
1693-
o['variables']['node_use_node_snapshot'] = b(
1694-
not cross_compiling and not options.shared)
1689+
o['variables']['node_use_node_snapshot'] = b(not cross_compiling)
16951690

16961691
# Do not use code cache when Node.js is built for collecting coverage of itself, this allows more
16971692
# precise coverage for the JS built-ins.
16981693
if options.without_node_code_cache or options.without_node_snapshot or options.node_builtin_modules_path or options.coverage:
16991694
o['variables']['node_use_node_code_cache'] = 'false'
17001695
else:
17011696
# TODO(refack): fix this when implementing embedded code-cache when cross-compiling.
1702-
o['variables']['node_use_node_code_cache'] = b(
1703-
not cross_compiling and not options.shared)
1697+
o['variables']['node_use_node_code_cache'] = b(not cross_compiling)
17041698

17051699
if options.write_snapshot_as_array_literals is not None:
17061700
o['variables']['node_write_snapshot_as_array_literals'] = b(options.write_snapshot_as_array_literals)

0 commit comments

Comments
 (0)