Skip to content

Commit d39cbf9

Browse files
committed
build: add node_lib_target_name to cctest deps
Currently the cctest target depend on the node_core_target_name target. But it is the node_lib_target_name target that compiles the sources now which means that if a source file in src is updated the cctest executable will not be re-linked against it, but will remain unchanged. The code will still be compiled, just not linked which means that if you are debugging you'll not see the changes and also a warning will be displayed about this issue. This commit changes the cctest target to depend on node_lib_target_name.
1 parent e9ba0cf commit d39cbf9

File tree

2 files changed

+3
-158
lines changed

2 files changed

+3
-158
lines changed

node.gyp

Lines changed: 3 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -911,48 +911,14 @@
911911
'type': 'executable',
912912

913913
'dependencies': [
914-
'<(node_core_target_name)',
915-
'rename_node_bin_win',
914+
'<(node_lib_target_name)',
916915
'deps/gtest/gtest.gyp:gtest',
917916
'node_js2c#host',
918917
'node_dtrace_header',
919918
'node_dtrace_ustack',
920919
'node_dtrace_provider',
921920
],
922921

923-
'variables': {
924-
'obj_path': '<(obj_dir)/<(node_lib_target_name)/src',
925-
'obj_gen_path': '<(obj_dir)/<(node_lib_target_name)/gen',
926-
'obj_tracing_path': '<(obj_dir)/<(node_lib_target_name)/src/tracing',
927-
'obj_suffix': 'o',
928-
'obj_separator': '/',
929-
'conditions': [
930-
['OS=="win"', {
931-
'obj_suffix': 'obj',
932-
}],
933-
['GENERATOR=="ninja"', {
934-
'obj_path': '<(obj_dir)/src',
935-
'obj_gen_path': '<(obj_dir)/gen',
936-
'obj_tracing_path': '<(obj_dir)/src/tracing',
937-
'obj_separator': '/<(node_lib_target_name).',
938-
}, {
939-
'conditions': [
940-
['OS=="win"', {
941-
'obj_path': '<(obj_dir)/<(node_lib_target_name)',
942-
'obj_gen_path': '<(obj_dir)/<(node_lib_target_name)',
943-
'obj_tracing_path': '<(obj_dir)/<(node_lib_target_name)',
944-
}],
945-
['OS=="aix"', {
946-
'obj_path': '<(obj_dir)/<(node_lib_target_name)/src',
947-
'obj_gen_path': '<(obj_dir)/<(node_lib_target_name)/gen',
948-
'obj_tracing_path':
949-
'<(obj_dir)/<(node_lib_target_name)/src/tracing',
950-
}],
951-
]}
952-
]
953-
],
954-
},
955-
956922
'includes': [
957923
'node.gypi'
958924
],
@@ -969,7 +935,6 @@
969935
'defines': [ 'NODE_WANT_INTERNALS=1' ],
970936

971937
'sources': [
972-
'test/cctest/node_module_reg.cc',
973938
'test/cctest/node_test_fixture.cc',
974939
'test/cctest/test_aliased_buffer.cc',
975940
'test/cctest/test_base64.cc',
@@ -979,120 +944,30 @@
979944
'test/cctest/test_url.cc'
980945
],
981946

982-
'libraries': [
983-
'<(obj_path)<(obj_separator)async_wrap.<(obj_suffix)',
984-
'<(obj_path)<(obj_separator)handle_wrap.<(obj_suffix)',
985-
'<(obj_path)<(obj_separator)env.<(obj_suffix)',
986-
'<(obj_path)<(obj_separator)node.<(obj_suffix)',
987-
'<(obj_path)<(obj_separator)node_buffer.<(obj_suffix)',
988-
'<(obj_path)<(obj_separator)node_debug_options.<(obj_suffix)',
989-
'<(obj_path)<(obj_separator)node_i18n.<(obj_suffix)',
990-
'<(obj_path)<(obj_separator)node_perf.<(obj_suffix)',
991-
'<(obj_path)<(obj_separator)node_platform.<(obj_suffix)',
992-
'<(obj_path)<(obj_separator)node_url.<(obj_suffix)',
993-
'<(obj_path)<(obj_separator)util.<(obj_suffix)',
994-
'<(obj_path)<(obj_separator)string_bytes.<(obj_suffix)',
995-
'<(obj_path)<(obj_separator)string_decoder.<(obj_suffix)',
996-
'<(obj_path)<(obj_separator)string_search.<(obj_suffix)',
997-
'<(obj_path)<(obj_separator)stream_base.<(obj_suffix)',
998-
'<(obj_path)<(obj_separator)node_constants.<(obj_suffix)',
999-
'<(obj_tracing_path)<(obj_separator)agent.<(obj_suffix)',
1000-
'<(obj_tracing_path)<(obj_separator)node_trace_buffer.<(obj_suffix)',
1001-
'<(obj_tracing_path)<(obj_separator)node_trace_writer.<(obj_suffix)',
1002-
'<(obj_tracing_path)<(obj_separator)trace_event.<(obj_suffix)',
1003-
'<(obj_gen_path)<(obj_separator)node_javascript.<(obj_suffix)',
1004-
],
1005-
1006947
'conditions': [
1007948
[ 'node_use_openssl=="true"', {
1008-
'conditions': [
1009-
['node_target_type!="static_library"', {
1010-
'libraries': [
1011-
'<(obj_path)<(obj_separator)node_crypto.<(obj_suffix)',
1012-
'<(obj_path)<(obj_separator)node_crypto_bio.<(obj_suffix)',
1013-
'<(obj_path)<(obj_separator)node_crypto_clienthello.<(obj_suffix)',
1014-
'<(obj_path)<(obj_separator)tls_wrap.<(obj_suffix)',
1015-
],
1016-
}],
1017-
],
1018949
'defines': [
1019950
'HAVE_OPENSSL=1',
1020951
],
1021952
}],
1022953
[ 'node_use_perfctr=="true"', {
1023954
'defines': [ 'HAVE_PERFCTR=1' ],
1024-
'libraries': [
1025-
'<(obj_path)<(obj_separator)node_counters.<(obj_suffix)',
1026-
'<(obj_path)<(obj_separator)'
1027-
'node_win32_perfctr_provider.<(obj_suffix)',
1028-
],
1029955
}],
1030956
['v8_enable_inspector==1', {
1031957
'sources': [
1032958
'test/cctest/test_inspector_socket.cc',
1033959
'test/cctest/test_inspector_socket_server.cc'
1034960
],
1035-
'conditions': [
1036-
['node_target_type!="static_library"', {
1037-
'libraries': [
1038-
'<(obj_path)<(obj_separator)inspector_agent.<(obj_suffix)',
1039-
'<(obj_path)<(obj_separator)inspector_io.<(obj_suffix)',
1040-
'<(obj_path)<(obj_separator)inspector_js_api.<(obj_suffix)',
1041-
'<(obj_path)<(obj_separator)inspector_socket.<(obj_suffix)',
1042-
'<(obj_path)<(obj_separator)inspector_socket_server.<(obj_suffix)',
1043-
],
1044-
}],
1045-
],
1046961
'defines': [
1047962
'HAVE_INSPECTOR=1',
1048963
],
1049-
}],
1050-
[ 'node_use_dtrace=="true" and node_target_type!="static_library"', {
1051-
'libraries': [
1052-
'<(obj_path)<(obj_separator)node_dtrace.<(obj_suffix)',
1053-
],
1054-
'conditions': [
1055-
['OS!="mac" and OS!="linux"', {
1056-
'libraries': [
1057-
'<(obj_path)<(obj_separator)node_dtrace_provider.<(obj_suffix)',
1058-
'<(obj_path)<(obj_separator)node_dtrace_ustack.<(obj_suffix)',
1059-
]
1060-
}],
1061-
['OS=="linux"', {
1062-
'libraries': [
1063-
'<(SHARED_INTERMEDIATE_DIR)<(obj_separator)'
1064-
'node_dtrace_provider.<(obj_suffix)',
1065-
]
1066-
}],
1067-
],
1068-
}, {
1069-
'conditions': [
1070-
[ 'node_use_etw=="true" and OS=="win"', {
1071-
'libraries': [
1072-
'<(obj_path)<(obj_separator)node_dtrace.<(obj_suffix)',
1073-
'<(obj_path)<(obj_separator)'
1074-
'node_win32_etw_provider.<(obj_suffix)',
1075-
],
1076-
}]
1077-
]
1078-
}],
1079-
[ 'OS=="win" and node_target_type!="static_library"', {
1080-
'libraries': [
1081-
'<(obj_path)<(obj_separator)backtrace_win32.<(obj_suffix)',
1082-
],
1083964
}, {
1084-
'conditions': [
1085-
['node_target_type!="static_library"', {
1086-
'libraries': [
1087-
'<(obj_path)<(obj_separator)backtrace_posix.<(obj_suffix)',
1088-
],
1089-
}],
1090-
],
965+
'defines': [ 'HAVE_INSPECTOR=0' ]
1091966
}],
1092967
['OS=="solaris"', {
1093968
'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
1094969
}],
1095-
]
970+
],
1096971
}
1097972
], # end targets
1098973

test/cctest/node_module_reg.cc

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)