[llvm] r204017 - [CMake][cygming] Disable --out-implib from executables.

NAKAMURA Takumi geek4civic at gmail.com
Sun Mar 16 06:51:26 PDT 2014


Author: chapuni
Date: Sun Mar 16 08:51:24 2014
New Revision: 204017

URL: http://llvm.org/viewvc/llvm-project?rev=204017&view=rev
Log:
[CMake][cygming] Disable --out-implib from executables.

It doesn't make sense even with --export-all-symbols.

Modified:
    llvm/trunk/cmake/modules/HandleLLVMOptions.cmake

Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=204017&r1=204016&r2=204017&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Sun Mar 16 08:51:24 2014
@@ -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





More information about the llvm-commits mailing list