purpleprotocol / mimalloc_rust

A Rust wrapper over Microsoft's MiMalloc memory allocator
MIT License
503 stars 41 forks source link

Linking with lld fails on Windows #10

Closed Boscop closed 1 year ago

Boscop commented 4 years ago

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
Speedy37 commented 4 years ago

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.