From f81612381e18eb07e3b6f43a0972cf1c26247b47 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 16 Mar 2014 13:51:24 +0000 Subject: [PATCH] [CMake][cygming] Disable --out-implib from executables. It doesn't make sense even with --export-all-symbols. llvm-svn: 204017 --- llvm/cmake/modules/HandleLLVMOptions.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index 7e68bfbe96a2..cd9773beb97b 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -399,6 +399,15 @@ if(NOT CYGWIN AND NOT WIN32) endif() endif() +if(CYGWIN OR MINGW) + # Prune --out-implib from executables. It doesn't make sense even + # with --export-all-symbols. + string(REGEX REPLACE "-Wl,--out-implib,[^ ]+ " " " + CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE}") + string(REGEX REPLACE "-Wl,--out-implib,[^ ]+ " " " + CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE}") +endif() + if(MSVC) # Remove flags here, for exceptions and RTTI. # Each target property or source property should be responsible to control