Author: mstorsjo Date: Mon Aug 13 23:13:36 2018 New Revision: 339642 URL: http://llvm.org/viewvc/llvm-project?rev=339642&view=rev Log: [cmake] Add MINGW_LIBRARIES to the linker flags
This is essential when building with -nodefaultlibs. In some CMake versions (noticed in 3.5.1), the same libraries are picked up from CMAKE_REQUIRED_LIBRARIES in some exceptional situations (if CXX probing failed, due to libc++ not being built yet, the libraries from CMAKE_REQUIRED_LIBRARIES are used for linking the target library), but not at all in other newer CMake versions (3.10). This is similar to what already is done in libcxxabi in SVN r302760 and libcxx in SVN r312498. Differential Revision: https://reviews.llvm.org/D50663 Modified: libunwind/trunk/src/CMakeLists.txt Modified: libunwind/trunk/src/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/CMakeLists.txt?rev=339642&r1=339641&r2=339642&view=diff ============================================================================== --- libunwind/trunk/src/CMakeLists.txt (original) +++ libunwind/trunk/src/CMakeLists.txt Mon Aug 13 23:13:36 2018 @@ -62,6 +62,9 @@ append_if(LIBUNWIND_CXX_FLAGS LIBUNWIND_ append_if(LIBUNWIND_LINK_FLAGS LIBUNWIND_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs) +# MINGW_LIBRARIES is defined in config-ix.cmake +append_if(libraries MINGW "${MINGW_LIBRARIES}") + if (LIBUNWIND_HAS_NO_EXCEPTIONS_FLAG AND LIBUNWIND_HAS_FUNWIND_TABLES) list(APPEND LIBUNWIND_COMPILE_FLAGS -fno-exceptions) list(APPEND LIBUNWIND_COMPILE_FLAGS -funwind-tables) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits