[PATCH] Don't use /implib when linking LLVM executables
Adrian McCarthy
amccarth at google.com
Wed Mar 18 14:13:05 PDT 2015
Hi chandlerc,
No import library is actually generated when linking the executables. Note that there was already code to do this for cywin and mingw.
This is a step toward eliminating the apparent circular dependency: lldb.lib (the fake import library) depends on lldb.exe, which depends on lldb.lib (the actual import library for (lib)lldb.
http://reviews.llvm.org/D8423
Files:
cmake/modules/HandleLLVMOptions.cmake
Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -467,6 +467,12 @@
CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE}")
string(REGEX REPLACE "-Wl,--out-implib,[^ ]+ " " "
CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE}")
+else(MSVC)
+ # Prune /implib from executables.
+ string(REGEX REPLACE "/implib:[^ ]+ " " "
+ CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE}")
+ string(REGEX REPLACE "/implib:[^ ]+ " " "
+ CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE}")
endif()
if(MSVC)
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8423.22209.patch
Type: text/x-patch
Size: 676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150318/b84f8289/attachment.bin>
More information about the llvm-commits
mailing list