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

Martell Malone via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 14:10:57 PDT 2017


martell added a comment.

In https://reviews.llvm.org/D33384#766084, @EricWF wrote:

> Why do we *need* to set it? Doesn't `_WIN32_WINNT` default to the current platform?


Not for mingw-w64, that wouldn't make much sense in general because of cross compiling.
It defaults to` 0x502` here which is a bump above Windows XP, which support was dropped for when MS officially dropped support for that platform.
https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-headers/crt/_mingw.h.in#L225



================
Comment at: libcxx/trunk/cmake/config-ix.cmake:53
     list(APPEND CMAKE_REQUIRED_LIBRARIES ${MINGW_LIBRARIES})
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0600")
   endif()
----------------
EricWF wrote:
> Shouldn't we use `add_definitions` ?
That makes sense.
I can change it to `add_definitions`



Repository:
  rL LLVM

https://reviews.llvm.org/D33384





More information about the llvm-commits mailing list