Fix MinGW build to use Pthread when the header is available.
Some MinGW configurations use WinPThread instead of the native
threading interfaces. When this happens libc++ doesn't build because
it tries to use the wrong threading API.
This patch attempts to correctly detect and enable pthreads; Selecting
them when __MINGW32__ is defined and __has_include(<pthread.h>) is true.
I'm not sure if this works correctly 100% of the time but it seemed
like the most correct approach available.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302734 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed