[libcxx-commits] [PATCH] D61087: [libcxxabi] Fix build of cxa_guard.cpp on configurations with _LIBCXXABI_HAS_NO_THREADS
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 24 22:31:03 PDT 2019
EricWF added a comment.
Hi James,
It's embarrassing we don't have test coverage for this. I've filed llvm.org/PR41596 to add buildbots for this configuration.
Sorry for the breakage and thanks for the patch.
================
Comment at: libcxxabi/src/cxa_guard_impl.h:241
bool unlock() { return std::__libcpp_mutex_unlock(&mutex); }
+#else
+ bool lock() { return 0; }
----------------
We just need to make the types complete. They don't need a mock interface. (In fact they shouldn't have one).
How about this:
1. Remove the forward declarations.
2. `#ifdef` out the entire body of `LibcppMutex` and `LibcppCondVar` when threads are disabled.
Ex:
```
struct LibcppMutex {
#ifndef _LIBCXXABI_HAS_NO_THREADS
...
#endif
};
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61087/new/
https://reviews.llvm.org/D61087
More information about the libcxx-commits
mailing list