[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:
parent
2b223bd1c7
commit
316f6003ef
|
@ -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,")
|
||||
|
|
Loading…
Reference in a new issue