[libcxxabi] r302824 - [Libcxxabi]: Support using compiler-rt for MinGW64

Martell Malone via cfe-commits cfe-commits at lists.llvm.org
Thu May 11 14:16:29 PDT 2017


Author: martell
Date: Thu May 11 16:16:29 2017
New Revision: 302824

URL: http://llvm.org/viewvc/llvm-project?rev=302824&view=rev
Log:
[Libcxxabi]: Support using compiler-rt for MinGW64

Reviewers: EricWF

Differential Revision: https://reviews.llvm.org/D33098

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=302824&r1=302823&r2=302824&view=diff
==============================================================================
--- libcxxabi/trunk/cmake/config-ix.cmake (original)
+++ libcxxabi/trunk/cmake/config-ix.cmake Thu May 11 16:16:29 2017
@@ -30,9 +30,14 @@ if (LIBCXXABI_HAS_NODEFAULTLIBS_FLAG)
   if (MINGW)
     # Mingw64 requires quite a few "C" runtime libraries in order for basic
     # programs to link successfully with -nodefaultlibs.
-    set(MINGW_LIBRARIES mingw32 gcc_s gcc moldname mingwex msvcrt advapi32
-                        shell32 user32 kernel32 iconv mingw32 gcc_s gcc moldname
-                        mingwex msvcrt)
+    if (LIBCXXABI_USE_COMPILER_RT)
+      set(MINGW_RUNTIME ${LIBCXXABI_BUILTINS_LIBRARY})
+    else ()
+      set(MINGW_RUNTIME gcc_s gcc)
+    endif()
+    set(MINGW_LIBRARIES mingw32 ${MINGW_RUNTIME} moldname mingwex msvcrt advapi32
+                        shell32 user32 kernel32 iconv mingw32 ${MINGW_RUNTIME}
+                        moldname mingwex msvcrt)
     list(APPEND CMAKE_REQUIRED_LIBRARIES ${MINGW_LIBRARIES})
   endif()
   if (CMAKE_C_FLAGS MATCHES -fsanitize OR CMAKE_CXX_FLAGS MATCHES -fsanitize)




More information about the cfe-commits mailing list