[PATCH] D111782: [AIX][cmake] Set atomics related macros when build with xlclang
Kai Luo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 18 02:18:20 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG96351680833e: [AIX][cmake] Set atomics related macros when build with xlclang (authored by lkail).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111782/new/
https://reviews.llvm.org/D111782
Files:
llvm/cmake/modules/CheckAtomic.cmake
Index: llvm/cmake/modules/CheckAtomic.cmake
===================================================================
--- llvm/cmake/modules/CheckAtomic.cmake
+++ llvm/cmake/modules/CheckAtomic.cmake
@@ -43,7 +43,7 @@
# Check for (non-64-bit) atomic operations.
if(MSVC)
set(HAVE_CXX_ATOMICS_WITHOUT_LIB True)
-elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE)
+elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL")
# First check if atomics work without the library.
check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
# If not, check if the library exists, and atomics work with it.
@@ -64,7 +64,7 @@
# Check for 64 bit atomic operations.
if(MSVC)
set(HAVE_CXX_ATOMICS64_WITHOUT_LIB True)
-elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE)
+elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL")
# First check if atomics work without the library.
check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
# If not, check if the library exists, and atomics work with it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111782.380313.patch
Type: text/x-patch
Size: 1026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211018/1d2ae607/attachment.bin>
More information about the llvm-commits
mailing list