diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-10-14 16:06:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-14 16:06:46 +0200 |
| commit | 0888c6dc7804ac5944d705c6aca1fdecbbefba82 (patch) | |
| tree | 9f6712ee5e8ce80bd808dcafb2d90248e7375b0a /src | |
| parent | 29081f95e9c7db9abd52eeeb794472a6636c9778 (diff) | |
| parent | c9af192690d52818e83acb8b591d23dbab856f77 (diff) | |
| download | rust-0888c6dc7804ac5944d705c6aca1fdecbbefba82.tar.gz rust-0888c6dc7804ac5944d705c6aca1fdecbbefba82.zip | |
Rollup merge of #89865 - tmandry:llvm-static, r=Mark-Simulacrum
Allow static linking LLVM with ThinLTO There's no reason not to allow this if the user wants it. It works, at least in a local build on linux host. For our use case, we're happy to spend more time building the compiler if it creates a speedup every time we run it, and we've observed speedups like this with clang.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/config.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 7818b8b7d51..e658d958d0a 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -825,15 +825,10 @@ impl Config { }; } - if config.llvm_thin_lto { - // If we're building with ThinLTO on, we want to link to LLVM - // shared, to avoid re-doing ThinLTO (which happens in the link - // step) with each stage. - assert_ne!( - llvm.link_shared, - Some(false), - "setting link-shared=false is incompatible with thin-lto=true" - ); + if config.llvm_thin_lto && llvm.link_shared.is_none() { + // If we're building with ThinLTO on, by default we want to link + // to LLVM shared, to avoid re-doing ThinLTO (which happens in + // the link step) with each stage. config.llvm_link_shared = true; } } |
