Skip to content

Commit 9f340d0

Browse files
authored
Merge pull request #19807 from cjjdespres/fix-ddr-compilation
Add debug type flag if compiling with clang
2 parents 3fe691e + 2a99009 commit 9f340d0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

runtime/ddr/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ if(OMR_TOOLCONFIG STREQUAL "gnu")
5555
# defining _FORTIFY_SOURCE is invalid when optimizations are disabled
5656
omr_remove_flags(CMAKE_C_FLAGS ${OMR_STRNCPY_FORTIFY_OPTIONS})
5757
omr_remove_flags(CMAKE_CXX_FLAGS ${OMR_STRNCPY_FORTIFY_OPTIONS})
58-
if(NOT CMAKE_CXX_COMPILER_ID MATCHES Clang)
59-
target_compile_options(j9ddr_misc PRIVATE -femit-class-debug-always)
60-
endif()
6158
endif()
6259

60+
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
61+
target_compile_options(j9ddr_misc PRIVATE -fno-eliminate-unused-debug-types)
62+
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
63+
target_compile_options(j9ddr_misc PRIVATE -femit-class-debug-always)
64+
endif()
6365

6466
if(OMR_OS_AIX)
6567
target_link_libraries(j9ddr_misc

0 commit comments

Comments
 (0)