[mlir] Fix linking with LLD
The issue is that /WHOLEARCHIVE is interpreted differently in LLD, which needs the same exact path as the .lib; whereas link.exe can take the library name, withoutout a path or extension, if that was already supplied on the cmd-line. I'll write a follow-up patch to fix the issue in LLD.
This commit is contained in:
@@ -44,7 +44,7 @@ function(whole_archive_link target)
|
||||
ENDFOREACH(LIB)
|
||||
elseif(MSVC)
|
||||
FOREACH(LIB ${ARGN})
|
||||
string(CONCAT link_flags ${link_flags} "/WHOLEARCHIVE:${LIB} ")
|
||||
string(CONCAT link_flags ${link_flags} "/WHOLEARCHIVE:lib/${LIB}.lib ")
|
||||
ENDFOREACH(LIB)
|
||||
else()
|
||||
set(link_flags "-L${CMAKE_BINARY_DIR}/lib -Wl,--whole-archive,")
|
||||
|
||||
Reference in New Issue
Block a user