Skip to content

Commit 18fd620

Browse files
danbevrvagg
authored andcommitted
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. Backport-PR-URL: #20797 PR-URL: #18576 Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Yihong Wang <yh.wang@ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 9bd5fc2 commit 18fd620

File tree

3 files changed

+25
-157
lines changed

3 files changed

+25
-157
lines changed

node.gyp

+3-126
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@
883883
'type': 'executable',
884884

885885
'dependencies': [
886-
'<(node_core_target_name)',
886+
'<(node_lib_target_name)',
887887
'rename_node_bin_win',
888888
'deps/gtest/gtest.gyp:gtest',
889889
'node_js2c#host',
@@ -892,39 +892,6 @@
892892
'node_dtrace_provider',
893893
],
894894

895-
'variables': {
896-
'obj_path': '<(obj_dir)/<(node_lib_target_name)/src',
897-
'obj_gen_path': '<(obj_dir)/<(node_lib_target_name)/gen',
898-
'obj_tracing_path': '<(obj_dir)/<(node_lib_target_name)/src/tracing',
899-
'obj_suffix': 'o',
900-
'obj_separator': '/',
901-
'conditions': [
902-
['OS=="win"', {
903-
'obj_suffix': 'obj',
904-
}],
905-
['GENERATOR=="ninja"', {
906-
'obj_path': '<(obj_dir)/src',
907-
'obj_gen_path': '<(obj_dir)/gen',
908-
'obj_tracing_path': '<(obj_dir)/src/tracing',
909-
'obj_separator': '/<(node_lib_target_name).',
910-
}, {
911-
'conditions': [
912-
['OS=="win"', {
913-
'obj_path': '<(obj_dir)/<(node_lib_target_name)',
914-
'obj_gen_path': '<(obj_dir)/<(node_lib_target_name)',
915-
'obj_tracing_path': '<(obj_dir)/<(node_lib_target_name)',
916-
}],
917-
['OS=="aix"', {
918-
'obj_path': '<(obj_dir)/<(node_lib_target_name)/src',
919-
'obj_gen_path': '<(obj_dir)/<(node_lib_target_name)/gen',
920-
'obj_tracing_path':
921-
'<(obj_dir)/<(node_lib_target_name)/src/tracing',
922-
}],
923-
]}
924-
]
925-
],
926-
},
927-
928895
'includes': [
929896
'node.gypi'
930897
],
@@ -941,7 +908,6 @@
941908
'defines': [ 'NODE_WANT_INTERNALS=1' ],
942909

943910
'sources': [
944-
'test/cctest/node_module_reg.cc',
945911
'test/cctest/node_test_fixture.cc',
946912
'test/cctest/test_aliased_buffer.cc',
947913
'test/cctest/test_base64.cc',
@@ -951,119 +917,30 @@
951917
'test/cctest/test_url.cc'
952918
],
953919

954-
'libraries': [
955-
'<(obj_path)<(obj_separator)async_wrap.<(obj_suffix)',
956-
'<(obj_path)<(obj_separator)handle_wrap.<(obj_suffix)',
957-
'<(obj_path)<(obj_separator)env.<(obj_suffix)',
958-
'<(obj_path)<(obj_separator)node.<(obj_suffix)',
959-
'<(obj_path)<(obj_separator)node_buffer.<(obj_suffix)',
960-
'<(obj_path)<(obj_separator)node_debug_options.<(obj_suffix)',
961-
'<(obj_path)<(obj_separator)node_i18n.<(obj_suffix)',
962-
'<(obj_path)<(obj_separator)node_perf.<(obj_suffix)',
963-
'<(obj_path)<(obj_separator)node_platform.<(obj_suffix)',
964-
'<(obj_path)<(obj_separator)node_url.<(obj_suffix)',
965-
'<(obj_path)<(obj_separator)util.<(obj_suffix)',
966-
'<(obj_path)<(obj_separator)string_bytes.<(obj_suffix)',
967-
'<(obj_path)<(obj_separator)string_search.<(obj_suffix)',
968-
'<(obj_path)<(obj_separator)stream_base.<(obj_suffix)',
969-
'<(obj_path)<(obj_separator)node_constants.<(obj_suffix)',
970-
'<(obj_tracing_path)<(obj_separator)agent.<(obj_suffix)',
971-
'<(obj_tracing_path)<(obj_separator)node_trace_buffer.<(obj_suffix)',
972-
'<(obj_tracing_path)<(obj_separator)node_trace_writer.<(obj_suffix)',
973-
'<(obj_tracing_path)<(obj_separator)trace_event.<(obj_suffix)',
974-
'<(obj_gen_path)<(obj_separator)node_javascript.<(obj_suffix)',
975-
],
976-
977920
'conditions': [
978921
[ 'node_use_openssl=="true"', {
979-
'conditions': [
980-
['node_target_type!="static_library"', {
981-
'libraries': [
982-
'<(obj_path)<(obj_separator)node_crypto.<(obj_suffix)',
983-
'<(obj_path)<(obj_separator)node_crypto_bio.<(obj_suffix)',
984-
'<(obj_path)<(obj_separator)node_crypto_clienthello.<(obj_suffix)',
985-
'<(obj_path)<(obj_separator)tls_wrap.<(obj_suffix)',
986-
],
987-
}],
988-
],
989922
'defines': [
990923
'HAVE_OPENSSL=1',
991924
],
992925
}],
993926
[ 'node_use_perfctr=="true"', {
994927
'defines': [ 'HAVE_PERFCTR=1' ],
995-
'libraries': [
996-
'<(obj_path)<(obj_separator)node_counters.<(obj_suffix)',
997-
'<(obj_path)<(obj_separator)'
998-
'node_win32_perfctr_provider.<(obj_suffix)',
999-
],
1000928
}],
1001929
['v8_enable_inspector==1', {
1002930
'sources': [
1003931
'test/cctest/test_inspector_socket.cc',
1004932
'test/cctest/test_inspector_socket_server.cc'
1005933
],
1006-
'conditions': [
1007-
['node_target_type!="static_library"', {
1008-
'libraries': [
1009-
'<(obj_path)<(obj_separator)inspector_agent.<(obj_suffix)',
1010-
'<(obj_path)<(obj_separator)inspector_io.<(obj_suffix)',
1011-
'<(obj_path)<(obj_separator)inspector_js_api.<(obj_suffix)',
1012-
'<(obj_path)<(obj_separator)inspector_socket.<(obj_suffix)',
1013-
'<(obj_path)<(obj_separator)inspector_socket_server.<(obj_suffix)',
1014-
],
1015-
}],
1016-
],
1017934
'defines': [
1018935
'HAVE_INSPECTOR=1',
1019936
],
1020-
}],
1021-
[ 'node_use_dtrace=="true" and node_target_type!="static_library"', {
1022-
'libraries': [
1023-
'<(obj_path)<(obj_separator)node_dtrace.<(obj_suffix)',
1024-
],
1025-
'conditions': [
1026-
['OS!="mac" and OS!="linux"', {
1027-
'libraries': [
1028-
'<(obj_path)<(obj_separator)node_dtrace_provider.<(obj_suffix)',
1029-
'<(obj_path)<(obj_separator)node_dtrace_ustack.<(obj_suffix)',
1030-
]
1031-
}],
1032-
['OS=="linux"', {
1033-
'libraries': [
1034-
'<(SHARED_INTERMEDIATE_DIR)<(obj_separator)'
1035-
'node_dtrace_provider.<(obj_suffix)',
1036-
]
1037-
}],
1038-
],
1039-
}, {
1040-
'conditions': [
1041-
[ 'node_use_etw=="true" and OS=="win"', {
1042-
'libraries': [
1043-
'<(obj_path)<(obj_separator)node_dtrace.<(obj_suffix)',
1044-
'<(obj_path)<(obj_separator)'
1045-
'node_win32_etw_provider.<(obj_suffix)',
1046-
],
1047-
}]
1048-
]
1049-
}],
1050-
[ 'OS=="win" and node_target_type!="static_library"', {
1051-
'libraries': [
1052-
'<(obj_path)<(obj_separator)backtrace_win32.<(obj_suffix)',
1053-
],
1054937
}, {
1055-
'conditions': [
1056-
['node_target_type!="static_library"', {
1057-
'libraries': [
1058-
'<(obj_path)<(obj_separator)backtrace_posix.<(obj_suffix)',
1059-
],
1060-
}],
1061-
],
938+
'defines': [ 'HAVE_INSPECTOR=0' ]
1062939
}],
1063940
['OS=="solaris"', {
1064941
'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
1065942
}],
1066-
]
943+
],
1067944
}
1068945
], # end targets
1069946

test/cctest/node_module_reg.cc

-29
This file was deleted.

test/cctest/test_node_postmortem_metadata.cc

+22-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
1-
#include "node_postmortem_metadata.cc"
2-
31
#include "gtest/gtest.h"
42
#include "node.h"
53
#include "node_internals.h"
64
#include "node_test_fixture.h"
75
#include "req-wrap-inl.h"
86
#include "tracing/agent.h"
97
#include "v8.h"
8+
#include "v8abbr.h"
9+
10+
extern "C" {
11+
extern uintptr_t
12+
nodedbg_offset_HandleWrap__handle_wrap_queue___ListNode_HandleWrap;
13+
extern uintptr_t
14+
nodedbg_offset_Environment__handle_wrap_queue___Environment_HandleWrapQueue;
15+
extern int debug_symbols_generated;
16+
extern int nodedbg_const_Environment__kContextEmbedderDataIndex__int;
17+
extern uintptr_t
18+
nodedbg_offset_Environment_HandleWrapQueue__head___ListNode_HandleWrap;
19+
extern uintptr_t
20+
nodedbg_offset_Environment__req_wrap_queue___Environment_ReqWrapQueue;
21+
extern uintptr_t nodedbg_offset_ExternalString__data__uintptr_t;
22+
extern uintptr_t nodedbg_offset_ListNode_ReqWrap__next___uintptr_t;
23+
extern uintptr_t nodedbg_offset_ReqWrap__req_wrap_queue___ListNode_ReqWrapQueue;
24+
extern uintptr_t nodedbg_offset_ListNode_HandleWrap__next___uintptr_t;
25+
extern uintptr_t
26+
nodedbg_offset_Environment_ReqWrapQueue__head___ListNode_ReqWrapQueue;
27+
extern uintptr_t
28+
nodedbg_offset_BaseObject__persistent_handle___v8_Persistent_v8_Object;
29+
}
1030

1131

1232
class DebugSymbolsTest : public EnvironmentTestFixture {};

0 commit comments

Comments
 (0)