This allows building libc++ against winpthreads from mingw-w64 to support
operating systems older than Windows 7. The remaining libc++ code already
supports `WIN32` with `LIBCXX_HAS_PTHREAD_API`.
Note that there is also the older "pthreads-win32". However, that support
library implements `pthread_t` as a struct, which violates the libc++
assumption that `pthread_t` is always a scalar and can be compared,
ordered, and set to zero.
Differential Revision: https://reviews.llvm.org/D96339
list(APPEND LIBCXX_SOURCES
support/win32/locale_win32.cpp
support/win32/support.cpp
- support/win32/thread_win32.cpp
)
+
+ if (NOT LIBCXX_HAS_PTHREAD_API)
+ list(APPEND LIBCXX_SOURCES
+ support/win32/thread_win32.cpp
+ )
+ endif()
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
list(APPEND LIBCXX_SOURCES
support/solaris/mbsnrtowcs.inc