[libcxx-commits] [libcxxabi] r359175 - Fix compilation error with -DLIBCXXABI_ENABLE_THREADS=OFF
Michael Platings via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 25 02:27:51 PDT 2019
Author: michaelplatings
Date: Thu Apr 25 02:27:50 2019
New Revision: 359175
URL: http://llvm.org/viewvc/llvm-project?rev=359175&view=rev
Log:
Fix compilation error with -DLIBCXXABI_ENABLE_THREADS=OFF
The error is:
libcxxabi/src/cxa_guard_impl.h: In instantiation of ‘__cxxabiv1::{anonymous}::LibcppMutex __cxxabiv1::{anonymous}::GlobalStatic<__cxxabiv1::{anonymous}::LibcppMutex>::instance’:
libcxxabi/src/cxa_guard_impl.h:529:62: required from here
libcxxabi/src/cxa_guard_impl.h:510:23: error: ‘__cxxabiv1::{anonymous}::LibcppMutex __cxxabiv1::{anonymous}::GlobalStatic<__cxxabiv1::{anonymous}::LibcppMutex>::instance’ has incomplete type
_LIBCPP_SAFE_STATIC T GlobalStatic<T>::instance = {};
^
Modified:
libcxxabi/trunk/src/cxa_guard_impl.h
Modified: libcxxabi/trunk/src/cxa_guard_impl.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_guard_impl.h?rev=359175&r1=359174&r2=359175&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_guard_impl.h (original)
+++ libcxxabi/trunk/src/cxa_guard_impl.h Thu Apr 25 02:27:50 2019
@@ -257,6 +257,9 @@ struct LibcppCondVar {
private:
std::__libcpp_condvar_t cond = _LIBCPP_CONDVAR_INITIALIZER;
};
+#else
+struct LibcppMutex {};
+struct LibcppCondVar {};
#endif // !defined(_LIBCXXABI_HAS_NO_THREADS)
More information about the libcxx-commits
mailing list