[PATCH] D33388: [libcxx] fixup bootstrapping for mingw-w64

Martell Malone via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 15:19:14 PDT 2017


martell added inline comments.


================
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:
> martell wrote:
> > EricWF wrote:
> > > chapuni wrote:
> > > > EricWF wrote:
> > > > > `-D_WIN32_WINNT=0x0600`. What? Why?
> > > > > 
> > > > > First isn't `0x0600` Windows Vista? Why are we asking to support such an old operating system?
> > > > > Why are we defining this at all?
> > > > > 
> > > > I think it'd be good thing to require minimum version as the bottom line.
> > > Perhaps, but at minimum this is not the patch to do it in unless it's a required change to make MinGW work, otherwise it should be done as a separate commit because a wider range of Win32 interfaces are used when targeting non-MinGW Windows.
> > Yes this patch is required to make mingw work for the win32 c++ threading api in libcxx.
> > `0x0600` is the min version to access the fibersapi.
> > See here https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-headers/include/fibersapi.h#L17
> > 
> > The default value for mingw-w64 currently is `0x502` See here https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-headers/crt/_mingw.h.in#L225
> > 
> > When building for the pthread api `0x0502` is fine, we just need a bump for fibersapi.
> > 
> > From my description in the other patch Revision.
> > `When bootstrapping with _LIBCPP_HAS_THREAD_API_WIN32 we need to set windows version to atleast 0x0600 for the fibersapi`
> > 
> @martell Could you please submit this change as a separate review? Doing so will allow this patch to land immediately. 
I'll just commit this now without that line and I will create another diff for that.


Repository:
  rL LLVM

https://reviews.llvm.org/D33388





More information about the llvm-commits mailing list