]> granicus.if.org Git - llvm/commitdiff
Support: use internal `call_once` on PPC64le
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 14 Feb 2019 18:36:52 +0000 (18:36 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 14 Feb 2019 18:36:52 +0000 (18:36 +0000)
Always use the internal `call_once` for PPC64le.  This is needed to
support the Swift toolchain on PPC64le.

Patch by Sarvesh Tamba!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354045 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Threading.h

index 23b115f0b47816a988198660bc0b96827a28ef16..953c60f91dd4d8231c37b2e3e7fa84aa4a14404e 100644 (file)
@@ -32,6 +32,9 @@
 // implementations like libstdc++ are known to have problems on NetBSD,
 // OpenBSD and PowerPC.
 #define LLVM_THREADING_USE_STD_CALL_ONCE 1
+#elif defined(LLVM_ON_UNIX) &&                                                 \
+    ((defined(__ppc__) || defined(__PPC__)) && defined(__LITTLE_ENDIAN__))
+#define LLVM_THREADING_USE_STD_CALL_ONCE 1
 #else
 #define LLVM_THREADING_USE_STD_CALL_ONCE 0
 #endif