IssueRaiser

Use lld by default on x64 msvc windows

This is a metabug, constraining the unbound scope of #39915. # What is lld [A linker that's part of the llvm project](https://lld.llvm.org/index.html), which is desirable for two reasons: * it's very friendly to cross compilation (hence its emphasis for embedded targets) * it's very fast (often runs in half the time as Gold -- linking can take several minutes for big projects (rustc, servo, etc.) and linking can be a huge % of the compile with incremental builds, so halving this runtime is a Big Deal.) Rust currently ships its own copy of lld which it calls rust-lld. This is used by default to link bare-metal targets and wasm. # Goal The goal of this metabug is to use rust-lld by default when targeting x64 msvc windows (as opposed to e.g. mingw windows). It's possible this will incidentally get other windows targets working, but I'm constraining scope for the sake of focusing efforts. This configuration is already in a decent state, with backend support already implemented. It's just a matter of making that configuration stable enough to use by default. **To test using rust-lld for msvc targets, use `-C linker=lld`** # Blocking Issues [lld on windows status page](https://lld.llvm.org/windows_support.html) * [x] #68647 - linking libtest results in undefined symbols * [x] #71504 - rust-analyser segfault with lto=thin, linker=lld-link * [x] #72145 - LLD/COFF does not correctly align TLS section * [x] https://github.com/rust-lang/rust/issues/81408 - ACCESS_VIOLATION whe

Posted by Gankra on Apr 24, 2020, 4:57 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

support (Software)

Use lld by default on x64 msvc windows

GankraApr 24, 2020, 4:57 PM

This is a metabug, constraining the unbound scope of #39915. # What is lld [A linker that's part of the llvm project](https://lld.llvm.org/index.html), which is desirable for two reasons: * it's very friendly to cross compilation (hence its emphasis for embedded targets) * it's very fast (often runs in half the time as Gold -- linking can take several minutes for big projects (rustc, servo, etc.) and linking can be a huge % of the compile with incremental builds, so halving this runtime is a Big Deal.) Rust currently ships its own copy of lld which it calls rust-lld. This is used by default to link bare-metal targets and wasm. # Goal The goal of this metabug is to use rust-lld by default when targeting x64 msvc windows (as opposed to e.g. mingw windows). It's possible this will incidentally get other windows targets working, but I'm constraining scope for the sake of focusing efforts. This configuration is already in a decent state, with backend support already implemented. It's just a matter of making that configuration stable enough to use by default. **To test using rust-lld for msvc targets, use `-C linker=lld`** # Blocking Issues [lld on windows status page](https://lld.llvm.org/windows_support.html) * [x] #68647 - linking libtest results in undefined symbols * [x] #71504 - rust-analyser segfault with lto=thin, linker=lld-link * [x] #72145 - LLD/COFF does not correctly align TLS section * [x] https://github.com/rust-lang/rust/issues/81408 - ACCESS_VIOLATION whe

Comments (0)

No comments yet. Start the discussion.

Comment on this issue