Skip to content

Commit

Permalink
build: do not put commands in sources variables
Browse files Browse the repository at this point in the history
PR-URL: #56885
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
zcbenz authored Feb 5, 2025
1 parent 3207fda commit 6aa42f9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
6 changes: 6 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,11 @@ def gcc_version_ge(version_checked):
def configure_node_lib_files(o):
o['variables']['node_library_files'] = SearchFiles('lib', 'js')

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

def configure_node(o):
if options.dest_os == 'android':
o['variables']['OS'] = 'android'
Expand Down Expand Up @@ -2207,6 +2212,7 @@ def make_bin_override():

configure_node(output)
configure_node_lib_files(output)
configure_node_cctest_sources(output)
configure_napi(output)
configure_library('zlib', output)
configure_library('http_parser', output)
Expand Down
5 changes: 0 additions & 5 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,6 @@
'src/quic/transportparams.h',
'src/quic/quic.cc',
],
'node_cctest_sources': [
'src/node_snapshot_stub.cc',
'<!@("<(python)" tools/search_files.py . test/cctest cc)',
'<!@("<(python)" tools/search_files.py . test/cctest h)',
],
'node_cctest_openssl_sources': [
'test/cctest/test_crypto_clienthello.cc',
'test/cctest/test_node_crypto.cc',
Expand Down
19 changes: 16 additions & 3 deletions unofficial.gni
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,26 @@ template("node_gn_build") {
"$node_simdutf_path",
]

sources = gypi_values.node_cctest_sources
sources = [ "src/node_snapshot_stub.cc" ]
sources += exec_script("./tools/search_files.py",
[ rebase_path(".", root_build_dir),
rebase_path("test/cctest", root_build_dir),
"cc" ],
"list lines")

if (node_use_openssl) {
deps += [ "deps/ncrypto" ]
sources += gypi_values.node_cctest_openssl_sources
} else {
sources -= gypi_values.node_cctest_openssl_sources
}
if (node_enable_inspector) {
sources += gypi_values.node_cctest_inspector_sources
deps += [ "src/inspector:crdtp" ]
include_dirs = [
"$target_gen_dir/src",
"$target_gen_dir/src/inspector",
]
} else {
sources -= gypi_values.node_cctest_inspector_sources
}
}

Expand Down

0 comments on commit 6aa42f9

Please sign in to comment.