diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-05-11 03:29:59 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-05-11 03:29:59 +0000 |
commit | accba012b4365f2b0ac8ab71e37fe81537236583 (patch) | |
tree | c47114cfd2add182c9c054e7e7483ea48feb64f7 /libcxxabi | |
parent | 144019ac22953313f6105446a9431060ace2aec3 (diff) | |
download | llvm-accba012b4365f2b0ac8ab71e37fe81537236583.zip llvm-accba012b4365f2b0ac8ab71e37fe81537236583.tar.gz llvm-accba012b4365f2b0ac8ab71e37fe81537236583.tar.bz2 |
Fix Libc++abi linking under MinGW64
llvm-svn: 302760
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/cmake/config-ix.cmake | 5 | ||||
-rw-r--r-- | libcxxabi/src/CMakeLists.txt | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libcxxabi/cmake/config-ix.cmake b/libcxxabi/cmake/config-ix.cmake index 3a6b86b..a19b19a 100644 --- a/libcxxabi/cmake/config-ix.cmake +++ b/libcxxabi/cmake/config-ix.cmake @@ -30,7 +30,10 @@ 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. - list(APPEND CMAKE_REQUIRED_LIBRARIES mingw32 gcc gcc_eh mingwex msvcrt gcc) + set(MINGW_LIBRARIES mingw32 gcc_s gcc moldname mingwex msvcrt advapi32 + shell32 user32 kernel32 iconv mingw32 gcc_s gcc moldname + mingwex msvcrt) + list(APPEND CMAKE_REQUIRED_LIBRARIES ${MINGW_LIBRARIES}) endif() if (CMAKE_C_FLAGS MATCHES -fsanitize OR CMAKE_CXX_FLAGS MATCHES -fsanitize) set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize=all") diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt index 1efc92e2..cbf962f 100644 --- a/libcxxabi/src/CMakeLists.txt +++ b/libcxxabi/src/CMakeLists.txt @@ -74,6 +74,10 @@ if (LIBCXXABI_USE_LLVM_UNWINDER) else() append_if(libraries LIBCXXABI_HAS_GCC_S_LIB gcc_s) endif() +if (MINGW) + # MINGW_LIBRARIES is defined in config-ix.cmake + list(APPEND libraries ${MINGW_LIBRARIES}) +endif() # Setup flags. append_if(LIBCXXABI_COMPILE_FLAGS LIBCXXABI_HAS_FPIC_FLAG -fPIC) |