Skip to content

Commit

Permalink
Allow static linking LLVM with ThinLTO
Browse files Browse the repository at this point in the history
  • Loading branch information
tmandry committed Oct 13, 2021
1 parent f06f9bb commit c9af192
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/bootstrap/config.rs
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit c9af192

Please sign in to comment.