[libcxx-commits] [PATCH] D61087: [libcxxabi] Fix build of cxa_guard.cpp on configurations with _LIBCXXABI_HAS_NO_THREADS

James Nagurne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 25 08:58:00 PDT 2019


JamesNagurne added inline comments.


================
Comment at: libcxxabi/src/cxa_guard_impl.h:241
   bool unlock() { return std::__libcpp_mutex_unlock(&mutex); }
+#else
+  bool lock() { return 0; }
----------------
EricWF wrote:
> 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
> };
> ```
It looks like someone already made a commit. to fix this. Do you still want this modification to my patch?
I apologize for the delayed response. The responses came during my after-hours.


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