HIP: Fix default flags for Debug configuration

Pass `-g` to enable debugging, not `-O` for optimizations.  This was
probably a typo in commit b50bfc8913 (HIP: Add language to CMake,
2020-08-28, v3.21.0-rc1~66^2~4).

Fixes: #26823
This commit is contained in:
Brad King
2025-04-01 10:51:51 -04:00
parent 9257afbf8b
commit b805f55325

View File

@@ -9,7 +9,7 @@ set(_CMAKE_HIP_RDC_FLAG "-fgpu-rdc")
if(NOT "x${CMAKE_HIP_SIMULATE_ID}" STREQUAL "xMSVC")
set(CMAKE_HIP_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
string(APPEND CMAKE_HIP_FLAGS_DEBUG_INIT " -O")
string(APPEND CMAKE_HIP_FLAGS_DEBUG_INIT " -g")
endif()
set(CMAKE_HIP_RUNTIME_LIBRARY_DEFAULT "SHARED")