Skip to content

Commit ddeda04

Browse files
Fix clang debug build (#2)
* Enable debug build on Windows with ROCm * fixed clang flag for debug config * fixed compiler flags for debug windows vs linux --------- Co-authored-by: Michal Gallus <[email protected]>
1 parent a9daa7f commit ddeda04

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

cmake/Dependencies.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,9 +1058,13 @@ if(USE_ROCM)
10581058
message("TORCH_HIP_VERSION=${TORCH_HIP_VERSION} is added as a compiler defines")
10591059

10601060
if(CMAKE_BUILD_TYPE MATCHES Debug)
1061-
list(APPEND HIP_CXX_FLAGS -g2)
1062-
list(APPEND HIP_CXX_FLAGS -O0)
1063-
list(APPEND HIP_HIPCC_FLAGS -fdebug-info-for-profiling)
1061+
if(WIN32)
1062+
list(APPEND HIP_CXX_FLAGS -g)
1063+
else()
1064+
list(APPEND HIP_CXX_FLAGS -g2)
1065+
endif()
1066+
list(APPEND HIP_CXX_FLAGS -O0)
1067+
list(APPEND HIP_HIPCC_FLAGS -fdebug-info-for-profiling)
10641068
endif(CMAKE_BUILD_TYPE MATCHES Debug)
10651069

10661070
# needed for compat with newer versions of hip-clang that introduced C++20 mangling rules

0 commit comments

Comments
 (0)