[PATCH] D33384: [libcxx] [libcxxabi] fix building with libc++ win32 threads for mingw-w64

Eric Fiselier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 15:28:36 PDT 2017


EricWF requested changes to this revision.
EricWF added a comment.
This revision now requires changes to proceed.

This isn't a solution to the problem. It may work when compiling the library, but that's not the important part.
The bits of libc++ that use the fibers interface are in the headers, that means that `_WINNT_VER` must 
also have the same value any time a libc++ header is included by a user. However this can only be
achieved by making the compiler pre-define `_WINNT_VER`, or by removing the nonsensically old
definition MinGW provides. Neither of these can be done by libc++.

For example:

  #include <windows.h> // _WINNT_VER isn't yet defined. Fibers are not included
  #include <thread> // libc++ is too late to change the definition.
  // ERROR <thread> cannot be compiled.




Repository:
  rL LLVM

https://reviews.llvm.org/D33384





More information about the llvm-commits mailing list