[PATCH] D31518: Try to fix the libcxx build with mingw64

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 30 17:46:27 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL299144: Try to fix the libcxx build with mingw64 (authored by rnk).

Changed prior to commit:
  https://reviews.llvm.org/D31518?vs=93568&id=93570#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D31518

Files:
  libcxx/trunk/cmake/config-ix.cmake


Index: libcxx/trunk/cmake/config-ix.cmake
===================================================================
--- libcxx/trunk/cmake/config-ix.cmake
+++ libcxx/trunk/cmake/config-ix.cmake
@@ -35,6 +35,11 @@
   elseif (LIBCXX_HAS_GCC_S_LIB)
     list(APPEND CMAKE_REQUIRED_LIBRARIES gcc_s)
   endif ()
+  if (MINGW)
+    # Mingw64 requires quite a few "C" runtime libraries in order for basic
+    # programs to link successfully with -nodefaultlibs.
+    list(APPEND CMAKE_REQUIRED_LIBRARIES mingw32 gcc gcc_eh mingwex msvcrt gcc)
+  endif()
   if (CMAKE_C_FLAGS MATCHES -fsanitize OR CMAKE_CXX_FLAGS MATCHES -fsanitize)
     set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize=all")
   endif ()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31518.93570.patch
Type: text/x-patch
Size: 708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170331/7cebc584/attachment-0001.bin>


More information about the cfe-commits mailing list