Skip to content

Commit d144572

Browse files
committedApr 25, 2019
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 = {}; ^ llvm-svn: 359175
1 parent 4ea70ec commit d144572

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎libcxxabi/src/cxa_guard_impl.h

+3
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ struct LibcppCondVar {
257257
private:
258258
std::__libcpp_condvar_t cond = _LIBCPP_CONDVAR_INITIALIZER;
259259
};
260+
#else
261+
struct LibcppMutex {};
262+
struct LibcppCondVar {};
260263
#endif // !defined(_LIBCXXABI_HAS_NO_THREADS)
261264

262265

0 commit comments

Comments
 (0)
Please sign in to comment.