How do I change the default rustc / Cargo linker?
Thanks to @Jmb comment, I found a solution. Turns out that the default linker that rustc uses is actually cc (which makes sense – it supplies all the needed defaults to compile/link C code, which also work for Rust). We can pass an argument to cc to make it link with lld: [target.x86_64-unknown-linux-gnu] rustflags = … Read more