From b805f55325382ede2e3b4e426e4e837d371b7330 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 1 Apr 2025 10:51:51 -0400 Subject: [PATCH] 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 --- Modules/Compiler/Clang-HIP.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Compiler/Clang-HIP.cmake b/Modules/Compiler/Clang-HIP.cmake index 92925f1a55..6da57ec857 100644 --- a/Modules/Compiler/Clang-HIP.cmake +++ b/Modules/Compiler/Clang-HIP.cmake @@ -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")