[libcxxabi] r302754 - Apply libc++ MinGW CMake fix to libc++abi

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Wed May 10 19:00:25 PDT 2017


Author: ericwf
Date: Wed May 10 21:00:25 2017
New Revision: 302754

URL: http://llvm.org/viewvc/llvm-project?rev=302754&view=rev
Log:
Apply libc++ MinGW CMake fix to libc++abi

Modified:
    libcxxabi/trunk/cmake/config-ix.cmake

Modified: libcxxabi/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/cmake/config-ix.cmake?rev=302754&r1=302753&r2=302754&view=diff
==============================================================================
--- libcxxabi/trunk/cmake/config-ix.cmake (original)
+++ libcxxabi/trunk/cmake/config-ix.cmake Wed May 10 21:00:25 2017
@@ -27,6 +27,11 @@ if (LIBCXXABI_HAS_NODEFAULTLIBS_FLAG)
   elseif (LIBCXXABI_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 ()




More information about the cfe-commits mailing list