[CMake][cygming] Disable --out-implib from executables.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 16 Mar 2014 13:51:24 +0000 (13:51 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 16 Mar 2014 13:51:24 +0000 (13:51 +0000)
It doesn't make sense even with --export-all-symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204017 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/HandleLLVMOptions.cmake

index 7e68bfbe96a2ea956c296581b88bf3bc02e6ef7e..cd9773beb97bc76a93048bd13c8a67de2d601b31 100644 (file)
@@ -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