Skip to content

Commit 316f600

Browse files
committed
[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.
1 parent 2b223bd commit 316f600

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function(whole_archive_link target)
4444
ENDFOREACH(LIB)
4545
elseif(MSVC)
4646
FOREACH(LIB ${ARGN})
47-
string(CONCAT link_flags ${link_flags} "/WHOLEARCHIVE:${LIB} ")
47+
string(CONCAT link_flags ${link_flags} "/WHOLEARCHIVE:lib/${LIB}.lib ")
4848
ENDFOREACH(LIB)
4949
else()
5050
set(link_flags "-L${CMAKE_BINARY_DIR}/lib -Wl,--whole-archive,")

0 commit comments

Comments
 (0)