purpleprotocol / mimalloc_rust

A Rust wrapper over Microsoft's MiMalloc memory allocator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linking with lld fails on Windows

Boscop opened this issue · 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

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.