Skip to content

Commit 02cd8e0

Browse files
zcbenzRafaelGSS
authored andcommitted
build: do not put commands in sources variables
PR-URL: #56885 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
1 parent 53a7bfc commit 02cd8e0

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

configure.py

+6
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,11 @@ def gcc_version_ge(version_checked):
13921392
def configure_node_lib_files(o):
13931393
o['variables']['node_library_files'] = SearchFiles('lib', 'js')
13941394

1395+
def configure_node_cctest_sources(o):
1396+
o['variables']['node_cctest_sources'] = [ 'src/node_snapshot_stub.cc' ] + \
1397+
SearchFiles('test/cctest', 'cc') + \
1398+
SearchFiles('test/cctest', 'h')
1399+
13951400
def configure_node(o):
13961401
if options.dest_os == 'android':
13971402
o['variables']['OS'] = 'android'
@@ -2204,6 +2209,7 @@ def make_bin_override():
22042209

22052210
configure_node(output)
22062211
configure_node_lib_files(output)
2212+
configure_node_cctest_sources(output)
22072213
configure_napi(output)
22082214
configure_library('zlib', output)
22092215
configure_library('http_parser', output)

node.gyp

-5
Original file line numberDiff line numberDiff line change
@@ -399,11 +399,6 @@
399399
'src/quic/transportparams.h',
400400
'src/quic/quic.cc',
401401
],
402-
'node_cctest_sources': [
403-
'src/node_snapshot_stub.cc',
404-
'<!@("<(python)" tools/search_files.py . test/cctest cc)',
405-
'<!@("<(python)" tools/search_files.py . test/cctest h)',
406-
],
407402
'node_cctest_openssl_sources': [
408403
'test/cctest/test_crypto_clienthello.cc',
409404
'test/cctest/test_node_crypto.cc',

unofficial.gni

+16-3
Original file line numberDiff line numberDiff line change
@@ -345,13 +345,26 @@ template("node_gn_build") {
345345
"$node_simdutf_path",
346346
]
347347

348-
sources = gypi_values.node_cctest_sources
348+
sources = [ "src/node_snapshot_stub.cc" ]
349+
sources += exec_script("./tools/search_files.py",
350+
[ rebase_path(".", root_build_dir),
351+
rebase_path("test/cctest", root_build_dir),
352+
"cc" ],
353+
"list lines")
354+
349355
if (node_use_openssl) {
350356
deps += [ "deps/ncrypto" ]
351-
sources += gypi_values.node_cctest_openssl_sources
357+
} else {
358+
sources -= gypi_values.node_cctest_openssl_sources
352359
}
353360
if (node_enable_inspector) {
354-
sources += gypi_values.node_cctest_inspector_sources
361+
deps += [ "src/inspector:crdtp" ]
362+
include_dirs = [
363+
"$target_gen_dir/src",
364+
"$target_gen_dir/src/inspector",
365+
]
366+
} else {
367+
sources -= gypi_values.node_cctest_inspector_sources
355368
}
356369
}
357370

0 commit comments

Comments
 (0)