Skip to content

Commit a9679ac

Browse files
committed
8253620: Debug symbols for tests missing on macos and windows
Reviewed-by: dholmes, ihse, jwaters
1 parent 020255a commit a9679ac

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

make/common/TestFilesCompilation.gmk

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ define SetupTestFilesCompilationBody
8787

8888
$1_BUILD_INFO := $$($1_OUTPUT_DIR)/_$1-build-info.marker
8989

90+
# Tests are built with internal debug symbols where supported.
91+
# With Visual Studio or on macosx, we revert to external.
92+
$1_COPY_DEBUG_SYMBOLS := false
93+
ifeq ($(TOOLCHAIN_TYPE), microsoft)
94+
$1_COPY_DEBUG_SYMBOLS := true
95+
else ifeq ($(call isTargetOs, macosx), true)
96+
$1_COPY_DEBUG_SYMBOLS := true
97+
endif
98+
9099
# Setup a compilation for each and every one of them
91100
$$(foreach file, $$($1_FILTERED_FILE_LIST),\
92101
$$(eval name := $$(strip $$(basename $$(notdir $$(file))))) \
@@ -106,7 +115,7 @@ define SetupTestFilesCompilationBody
106115
LIBS := $$($1_LIBS_$$(name)), \
107116
TOOLCHAIN := $(if $$(filter %.cpp, $$(file)), TOOLCHAIN_LINK_CXX, TOOLCHAIN_DEFAULT), \
108117
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)),$$($1_OPTIMIZATION_$$(name)),LOW), \
109-
COPY_DEBUG_SYMBOLS := $$(if $$($1_COPY_DEBUG_SYMBOLS_$$(name)),$$($1_COPY_DEBUG_SYMBOLS_$$(name)),false), \
118+
COPY_DEBUG_SYMBOLS := $$($1_COPY_DEBUG_SYMBOLS), \
110119
STRIP_SYMBOLS := $$(if $$($1_STRIP_SYMBOLS_$$(name)),$$($1_STRIP_SYMBOLS_$$(name)),false), \
111120
BUILD_INFO_LOG_MACRO := LogInfo, \
112121
)) \

make/test/JtregNativeHotspot.gmk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,6 @@ ifeq ($(call isTargetOs, windows), true)
863863
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libTestPsig.c exeGetCreatedJavaVMs.c
864864
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit := jvm.lib
865865
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativeStack := jvm.lib
866-
BUILD_HOTSPOT_JTREG_LIBRARIES_COPY_DEBUG_SYMBOLS_libnativeStack := true
867866
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exedaemonDestroy := jvm.lib
868867
else
869868
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exedaemonDestroy := -ljvm

0 commit comments

Comments
 (0)