aboutsummaryrefslogtreecommitdiff
path: root/libcxxabi
diff options
context:
space:
mode:
authorMartell Malone <martellmalone@gmail.com>2017-05-11 21:16:29 +0000
committerMartell Malone <martellmalone@gmail.com>2017-05-11 21:16:29 +0000
commit53877bc5b9c30f4ca868c2652ab2be760cf448ac (patch)
treedbcab3a0b92edd3f684f4d97d93a94b31a84113f /libcxxabi
parente7c7854cb1094df582586e2321e18aaebd754b08 (diff)
downloadllvm-53877bc5b9c30f4ca868c2652ab2be760cf448ac.zip
llvm-53877bc5b9c30f4ca868c2652ab2be760cf448ac.tar.gz
llvm-53877bc5b9c30f4ca868c2652ab2be760cf448ac.tar.bz2
[Libcxxabi]: Support using compiler-rt for MinGW64
Reviewers: EricWF Differential Revision: https://reviews.llvm.org/D33098 llvm-svn: 302824
Diffstat (limited to 'libcxxabi')
-rw-r--r--libcxxabi/cmake/config-ix.cmake11
1 files changed, 8 insertions, 3 deletions
diff --git a/libcxxabi/cmake/config-ix.cmake b/libcxxabi/cmake/config-ix.cmake
index a19b19a..5541ed4 100644
--- a/libcxxabi/cmake/config-ix.cmake
+++ b/libcxxabi/cmake/config-ix.cmake
@@ -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)