Skip to content

Commit 21bf527

Browse files
committed
build: do not put commands in sources variables
1 parent cadc4ed commit 21bf527

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

configure.py

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

1397+
def configure_node_cctest_sources(o):
1398+
o['variables']['node_cctest_sources'] = [ 'src/node_snapshot_stub.cc' ] + \
1399+
SearchFiles('test/cctest', 'cc') + \
1400+
SearchFiles('test/cctest', 'h')
1401+
13971402
def configure_node(o):
13981403
if options.dest_os == 'android':
13991404
o['variables']['OS'] = 'android'
@@ -2207,6 +2212,7 @@ def make_bin_override():
22072212

22082213
configure_node(output)
22092214
configure_node_lib_files(output)
2215+
configure_node_cctest_sources(output)
22102216
configure_napi(output)
22112217
configure_library('zlib', output)
22122218
configure_library('http_parser', output)

node.gyp

-5
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,6 @@
402402
'src/quic/transportparams.h',
403403
'src/quic/quic.cc',
404404
],
405-
'node_cctest_sources': [
406-
'src/node_snapshot_stub.cc',
407-
'<!@("<(python)" tools/search_files.py . test/cctest cc)',
408-
'<!@("<(python)" tools/search_files.py . test/cctest h)',
409-
],
410405
'node_cctest_openssl_sources': [
411406
'test/cctest/test_crypto_clienthello.cc',
412407
'test/cctest/test_node_crypto.cc',

unofficial.gni

+11-3
Original file line numberDiff line numberDiff line change
@@ -362,13 +362,21 @@ template("node_gn_build") {
362362
"$node_simdutf_path",
363363
]
364364

365-
sources = gypi_values.node_cctest_sources
365+
sources = exec_script("./tools/search_files.py",
366+
[ rebase_path(".", root_build_dir),
367+
rebase_path("test/cctest", root_build_dir),
368+
"cc" ],
369+
"list lines")
370+
366371
if (node_use_openssl) {
367372
deps += [ "deps/ncrypto" ]
368-
sources += gypi_values.node_cctest_openssl_sources
373+
} else {
374+
sources -= gypi_values.node_cctest_openssl_sources
369375
}
370376
if (node_enable_inspector) {
371-
sources += gypi_values.node_cctest_inspector_sources
377+
deps += [ "src/inspector:crdtp" ]
378+
} else {
379+
sources -= gypi_values.node_cctest_inspector_sources
372380
}
373381
}
374382

0 commit comments

Comments
 (0)