Skip to content

Commit 87e0675

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 a23cdec commit 87e0675

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
defconfigure_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_fpuor'neon'
16771677

16781678
ifoptions.node_snapshot_mainisnotNone:
1679-
ifoptions.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
ifoptions.without_node_snapshot:
16841680
error('--node-snapshot-main is incompatible with '+
16851681
'--without-node-snapshot')
@@ -1690,17 +1686,15 @@ def configure_node(o):
16901686
ifoptions.without_node_snapshotoroptions.node_builtin_modules_path:
16911687
o['variables']['node_use_node_snapshot'] ='false'
16921688
else:
1693-
o['variables']['node_use_node_snapshot'] =b(
1694-
notcross_compilingandnotoptions.shared)
1689+
o['variables']['node_use_node_snapshot'] =b(notcross_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
ifoptions.without_node_code_cacheoroptions.without_node_snapshotoroptions.node_builtin_modules_pathoroptions.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-
notcross_compilingandnotoptions.shared)
1697+
o['variables']['node_use_node_code_cache'] =b(notcross_compiling)
17041698

17051699
ifoptions.write_snapshot_as_array_literalsisnotNone:
17061700
o['variables']['node_write_snapshot_as_array_literals'] =b(options.write_snapshot_as_array_literals)

0 commit comments

Comments
 (0)