Skip to content

Commit de739ad

Browse files
authored
add -fclang-abi-compat=17 to HIP_HIPCC_FLAGS (#1377)
C++20 mangling rules were recently added to hip-clang. This flag maintains compatibility since pytorch is at C++17. Otherwise the linker fails.
1 parent 5d7b0c3 commit de739ad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/Dependencies.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,9 @@ if(USE_ROCM)
13141314
list(APPEND HIP_HIPCC_FLAGS -fdebug-info-for-profiling)
13151315
endif(CMAKE_BUILD_TYPE MATCHES Debug)
13161316

1317+
# needed for compat with newer versions of hip-clang that introduced C++20 mangling rules
1318+
list(APPEND HIP_HIPCC_FLAGS -fclang-abi-compat=17)
1319+
13171320
set(HIP_CLANG_FLAGS ${HIP_CXX_FLAGS})
13181321
# Ask hcc to generate device code during compilation so we can use
13191322
# host linker to link.

0 commit comments

Comments
 (0)