Skip to content

Commit 8e4c133

Browse files
jeffdailypruthvistony
authored andcommitted
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 d4e4d41 commit 8e4c133

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
@@ -1324,6 +1324,9 @@ if(USE_ROCM)
13241324
list(APPEND HIP_HIPCC_FLAGS -fdebug-info-for-profiling)
13251325
endif(CMAKE_BUILD_TYPE MATCHES Debug)
13261326

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

0 commit comments

Comments
 (0)