Skip to content

Commit 582b922

Browse files
zcbenztargos
authored andcommitted
build: do not put commands in sources variables
PR-URL: #56885 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent 0ee9c34 commit 582b922

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
@@ -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

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

365-
sources = gypi_values.node_cctest_sources
365+
sources = [ "src/node_snapshot_stub.cc" ]
366+
sources += exec_script("./tools/search_files.py",
367+
[ rebase_path(".", root_build_dir),
368+
rebase_path("test/cctest", root_build_dir),
369+
"cc" ],
370+
"list lines")
371+
366372
if (node_use_openssl) {
367373
deps += [ "deps/ncrypto" ]
368-
sources += gypi_values.node_cctest_openssl_sources
374+
} else {
375+
sources -= gypi_values.node_cctest_openssl_sources
369376
}
370377
if (node_enable_inspector) {
371-
sources += gypi_values.node_cctest_inspector_sources
378+
deps += [ "src/inspector:crdtp" ]
379+
include_dirs = [
380+
"$target_gen_dir/src",
381+
"$target_gen_dir/src/inspector",
382+
]
383+
} else {
384+
sources -= gypi_values.node_cctest_inspector_sources
372385
}
373386
}
374387

0 commit comments

Comments
 (0)