mimalloc_rust icon indicating copy to clipboard operation
mimalloc_rust copied to clipboard

Linking with lld fails on Windows

Open Boscop opened this issue 5 years ago • 1 comments

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

Boscop avatar Feb 10 '20 17:02 Boscop

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.

Speedy37 avatar Apr 21 '20 00:04 Speedy37