Skip to content

Commit 39ad77c

Browse files
committed
Fix DDR debug generation for Open XL on z/OS
Adds the `gdwarf-5` and `gsplit-dwarf` flags to enable split dwarf (dwo) files to be generated with Open XL on z/OS. By default the debug information is included in the `.o` files, which doesn't work with our ddrgen logic for z/OS. Also fixes existing code to allow all the debug information to be generated when working with split dwarf (dwo) files. Signed-off-by: Gaurav Chaudhari <[email protected]>
1 parent 543cd8b commit 39ad77c

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

runtime/cmake/platform/toolcfg/openxl.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ list(APPEND OMR_PLATFORM_COMPILE_OPTIONS
2727

2828
list(APPEND OMR_PLATFORM_CXX_COMPILE_OPTIONS -fno-rtti)
2929

30+
if(OMR_OS_ZOS)
31+
list(APPEND OMR_PLATFORM_COMPILE_OPTIONS -g -gdwarf-5 -gsplit-dwarf)
32+
endif()
33+
3034
# OMR_PLATFORM_CXX_COMPILE_OPTIONS get applied to JIT code (which needs exceptions),
3135
# so we put these in the CMAKE_CXX_FLAGS instead.
3236
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fignore-exceptions")

runtime/ddr/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if(CMAKE_C_COMPILER_ID STREQUAL "XLClang")
6161
if(CMAKE_C_COMPILER_VERSION AND (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "17.1"))
6262
target_compile_options(j9ddr_misc PRIVATE -qdbxextra)
6363
endif()
64-
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
64+
elseif((CMAKE_C_COMPILER_ID MATCHES "Clang") OR (OMR_TOOLCONFIG STREQUAL "openxl"))
6565
target_compile_options(j9ddr_misc PRIVATE -fno-eliminate-unused-debug-types)
6666
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
6767
target_compile_options(j9ddr_misc PRIVATE -femit-class-debug-always)

runtime/ddr/gcddr.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ GC_DdrDebugLink(MM_MemoryPoolSplitAddressOrderedList)
7171
GC_DdrDebugLink(MM_RealtimeMarkingScheme)
7272
GC_DdrDebugLink(MM_ScavengerForwardedHeader)
7373
GC_DdrDebugLink(MM_StringTable)
74+
GC_DdrDebugLink(MM_SublistPuddle)
7475

7576
#if defined(J9VM_GC_FINALIZATION)
7677
GC_DdrDebugLink(GC_FinalizeListManager)

0 commit comments

Comments
 (0)