[PATCH] D24864: [libcxxabi] Refactor pthread usage into a separate API
Asiri Rathnayake via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 14 16:51:22 PDT 2016
rmaprath added a comment.
In https://reviews.llvm.org/D24864#570924, @vitalybuka wrote:
> So there is:
> - Looking for __cxa_thread_atexit_impl in c
> - Looking for __cxa_thread_atexit_impl in c - not found
> and libcxx is configured with -DLIBCXX_ENABLE_THREADS=OFF
I think, the problem here is that `cxa_thread_atexit.cpp` is not properly guarded against the non-threaded use-case. If you look at the source prior to this patch, it refers to `pthread.h` and `pthread_key_t` unconditionally, it may have worked because pthread was somehow linked in.
The fix should be fairly straightforward. I will do a patch tomorrow (bit late in the day here), hope that's OK?
More information about the cfe-commits