- winpthreads build broken after D42214, should not build thread_win32.cpp when enable pthread witht MinGW.
- _LIBCPP_SAFE_STATIC incompatible with winpthreads, because winpthread PTHREAD_*_INITIALIZER use reinterpret_cast are not const.
Details
- Reviewers
EricWF
Diff Detail
- Repository
- rCXX libc++
- Build Status
Buildable 24187 Build 24186: arc lint + arc unit
Event Timeline
include/__config | ||
---|---|---|
1228 ↗ | (On Diff #170802) | I think you want to look at line #1155, and see if _LIBCPP_HAS_THREAD_API_WIN32 is the condition you want here. |
_LIBCPP_SAFE_STATIC incompatible with winpthreads, because winpthread PTHREAD_*_INITIALIZER use reinterpret_cast are not const.
winpthread PTHREAD_*_INITIALIZER is incompatible with the POSIX specification for PTHREAD_*_INITIALIZER. If we need to work around that, then fine, but it causes mutex to become really dangerous.
this is a bug in winpthreads and they should fix it.
include/__config | ||
---|---|---|
1228 ↗ | (On Diff #170802) | This change is *not* OK. You want to disable the application of this macro only in the specific case that's giving you problems, not generally. |
Can somebody land it before LLVM 8 is branched? Patch author does not have commit access.
Thanks in advance.
I'm sorry that nobody has replied to your request earlier. AFAICS the libcxx code has changed. Does it work now, or do we need to make thread_win32.cpp conditional to LIBCXX_HAS_WIN32_THREAD_API still?