Linking with lld fails on Windows
Boscop opened this issue · comments
Boscop commented
I'm using lld:
[target.x86_64-pc-windows-msvc]
linker = "lld-link"
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
And
mimalloc = { version = "0.1.12", default-features = false }
It fails with:
error: linking with `lld-link` failed: exit code: 1
= note: lld-link: warning: ignoring unknown argument '-fuse-ld=lld'
lld-link: error: could not open 'mimalloc-static-debug.lib': no such file or directory
Vincent Rouillé commented
The rustflags you provide is not used btw.
Just set the linker to lld-link.
lld-link is already a drop-in replacement for link.