Commit a1bc823
committed
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.
llvm-svn: 3027341 parent 40a87a9 commit a1bc823
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
| |||
980 | 986 | | |
981 | 987 | | |
982 | 988 | | |
| 989 | + | |
983 | 990 | | |
984 | 991 | | |
985 | 992 | | |
| |||
988 | 995 | | |
989 | 996 | | |
990 | 997 | | |
991 | | - | |
| 998 | + | |
992 | 999 | | |
993 | 1000 | | |
994 | 1001 | | |
| |||
0 commit comments