[libcxx-commits] [PATCH] D61113: [libc++abi] Fix LIBCXXABI_ENABLE_THREADS=OFF build
Sam Clegg via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 24 21:41:47 PDT 2019
sbc100 created this revision.
Herald added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, christof, aheejin.
Herald added a project: libc++.
This configuration was broken in rL359060 <https://reviews.llvm.org/rL359060>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D61113
Files:
libcxxabi/src/cxa_guard_impl.h
Index: libcxxabi/src/cxa_guard_impl.h
===================================================================
--- libcxxabi/src/cxa_guard_impl.h
+++ libcxxabi/src/cxa_guard_impl.h
@@ -220,10 +220,10 @@
// Global Mutex Implementation
//===----------------------------------------------------------------------===//
+#ifndef _LIBCXXABI_HAS_NO_THREADS
struct LibcppMutex;
struct LibcppCondVar;
-#ifndef _LIBCXXABI_HAS_NO_THREADS
struct LibcppMutex {
LibcppMutex() = default;
LibcppMutex(LibcppMutex const&) = delete;
@@ -514,6 +514,7 @@
using type = InitByteNoThreads;
};
+#ifndef _LIBCXXABI_HAS_NO_THREADS
template <>
struct SelectImplementation<Implementation::GlobalLock> {
using type = InitByteGlobalMutex<
@@ -526,6 +527,7 @@
using type =
InitByteFutex<PlatformFutexWait, PlatformFutexWake, PlatformThreadID>;
};
+#endif
// TODO(EricWF): We should prefer the futex implementation when available. But
// it should be done in a separate step from adding the implementation.
@@ -535,7 +537,7 @@
#elif defined(_LIBCXXABI_USE_FUTEX)
Implementation::Futex;
#else
- Implementation::GlobalLock;
+ Implementation::GlobalLock;
#endif
static_assert(CurrentImplementation != Implementation::Futex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61113.196576.patch
Type: text/x-patch
Size: 1260 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190425/e8083814/attachment.bin>
More information about the libcxx-commits
mailing list