Skip to content

Commit

Permalink
Merge pull request #1518 from jakurzak/develop
Browse files Browse the repository at this point in the history
Fix HIP debug flags to use -G only for NVIDIA compilers
  • Loading branch information
maddyscientist authored Nov 21, 2024
2 parents 3ce35dc + 7c6e572 commit 85ba0cd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/targets/hip/target_hip.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@ set(CMAKE_HIP_FLAGS_RELEASE
set(CMAKE_HIP_FLAGS_HOSTDEBUG
"-g"
CACHE STRING "Flags used by the C++ compiler during host-debug builds.")
set(CMAKE_HIP_FLAGS_DEBUG
"-g -G"
CACHE STRING "Flags used by the C++ compiler during full (host+device) debug builds.")
if(CMAKE_HIP_COMPILER_ID STREQUAL "NVIDIA")
set(CMAKE_HIP_FLAGS_DEBUG
"-g -G"
CACHE STRING "Flags used by the HIP compiler during debug builds (with device debug support for NVIDIA).")
else()
set(CMAKE_HIP_FLAGS_DEBUG
"-g"
CACHE STRING "Flags used by the HIP compiler during debug builds (with device debug support for Clang).")
endif()
set(CMAKE_HIP_FLAGS_SANITIZE
"-g "
CACHE STRING "Flags used by the C++ compiler during sanitizer debug builds.")
Expand Down

0 comments on commit 85ba0cd

Please sign in to comment.