From f57d5d08ba77b4386394573989bb79fb56b18a31 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Thu, 11 May 2017 02:00:25 +0000 Subject: [PATCH] Apply libc++ MinGW CMake fix to libc++abi llvm-svn: 302754 --- libcxxabi/cmake/config-ix.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libcxxabi/cmake/config-ix.cmake b/libcxxabi/cmake/config-ix.cmake index 93b511a..3a6b86b 100644 --- a/libcxxabi/cmake/config-ix.cmake +++ b/libcxxabi/cmake/config-ix.cmake @@ -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 () -- 2.7.4