[PATCH] D56382: Change llvm call once check for building Swift for PowerPC(ppc64le)
Sarvesh Tamba via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 7 03:22:34 PST 2019
sarveshtamba created this revision.
sarveshtamba added reviewers: nemanjai, compnerd.
Herald added subscribers: llvm-commits, jsji, kristina.
These changes are required to resolve the call_once related errors seen while building the Swift toolchain on PowerPC64LE. The existing macro checks are inadequate while building Swift on PowerPC64LE.
Repository:
rL LLVM
https://reviews.llvm.org/D56382
Files:
include/llvm/Support/Threading.h
Index: include/llvm/Support/Threading.h
===================================================================
--- include/llvm/Support/Threading.h
+++ include/llvm/Support/Threading.h
@@ -32,6 +32,10 @@
// 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(__LITTLE_ENDIAN__))
+// Check for PowerPC64LE to use std::call_once
+#define LLVM_THREADING_USE_STD_CALL_ONCE 1
#else
#define LLVM_THREADING_USE_STD_CALL_ONCE 0
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56382.180452.patch
Type: text/x-patch
Size: 631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190107/722a0c38/attachment.bin>
More information about the llvm-commits
mailing list