Skip to content

Commit 3d35dd8

Browse files
authored
build: build codecache and snapshot with libnode
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net> PR-URL: #63626 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
1 parent 60dab8d commit 3d35dd8

2 files changed

Lines changed: 152 additions & 103 deletions

File tree

configure.py

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

18201820
def configure_node_cctest_sources(o):
1821-
o['variables']['node_cctest_sources'] = [ 'src/node_snapshot_stub.cc' ] + \
1821+
o['variables']['node_cctest_sources'] = [] + \
18221822
SearchFiles('test/cctest', 'cc') + \
18231823
SearchFiles('test/cctest', 'h')
18241824

@@ -1886,10 +1886,6 @@ def configure_node(o):
18861886
o['variables']['arm_fpu'] = options.arm_fpu or 'neon'
18871887

18881888
if options.node_snapshot_main is not None:
1889-
if options.shared:
1890-
# This should be possible to fix, but we will need to refactor the
1891-
# libnode target to avoid building it twice.
1892-
error('--node-snapshot-main is incompatible with --shared')
18931889
if options.without_node_snapshot:
18941890
error('--node-snapshot-main is incompatible with ' +
18951891
'--without-node-snapshot')
@@ -1900,17 +1896,15 @@ def configure_node(o):
19001896
if options.without_node_snapshot or options.node_builtin_modules_path:
19011897
o['variables']['node_use_node_snapshot'] = 'false'
19021898
else:
1903-
o['variables']['node_use_node_snapshot'] = b(
1904-
not cross_compiling and not options.shared)
1899+
o['variables']['node_use_node_snapshot'] = b(not cross_compiling)
19051900

19061901
# Do not use code cache when Node.js is built for collecting coverage of itself, this allows more
19071902
# precise coverage for the JS built-ins.
19081903
if options.without_node_code_cache or options.without_node_snapshot or options.node_builtin_modules_path or options.coverage:
19091904
o['variables']['node_use_node_code_cache'] = 'false'
19101905
else:
19111906
# TODO(refack): fix this when implementing embedded code-cache when cross-compiling.
1912-
o['variables']['node_use_node_code_cache'] = b(
1913-
not cross_compiling and not options.shared)
1907+
o['variables']['node_use_node_code_cache'] = b(not cross_compiling)
19141908

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

0 commit comments

Comments
 (0)