diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2021-10-13 22:56:26 +0000 |
|---|---|---|
| committer | Tyler Mandry <tmandry@gmail.com> | 2021-10-13 22:58:03 +0000 |
| commit | c9af192690d52818e83acb8b591d23dbab856f77 (patch) | |
| tree | d5140139419f64f3fd3f7271e57677186337c379 /src/bootstrap | |
| parent | f06f9bbd3a2b0a2781decd6163b14f71dd59bf7f (diff) | |
| download | rust-c9af192690d52818e83acb8b591d23dbab856f77.tar.gz rust-c9af192690d52818e83acb8b591d23dbab856f77.zip | |
Allow static linking LLVM with ThinLTO
Diffstat (limited to 'src/bootstrap')
| -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 5706b8f9e7c..46843dac42f 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -824,15 +824,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; } } |
