mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-15 20:51:35 +00:00
Fix Libc++abi linking under MinGW64
llvm-svn: 302760
This commit is contained in:
parent
144019ac22
commit
accba012b4
@ -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")
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user