Skip to content

Commit c9af192

Browse files
committed
Allow static linking LLVM with ThinLTO
1 parent f06f9bb commit c9af192

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/bootstrap/config.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -824,15 +824,10 @@ impl Config {
824824
};
825825
}
826826

827-
if config.llvm_thin_lto {
828-
// If we're building with ThinLTO on, we want to link to LLVM
829-
// shared, to avoid re-doing ThinLTO (which happens in the link
830-
// step) with each stage.
831-
assert_ne!(
832-
llvm.link_shared,
833-
Some(false),
834-
"setting link-shared=false is incompatible with thin-lto=true"
835-
);
827+
if config.llvm_thin_lto && llvm.link_shared.is_none() {
828+
// If we're building with ThinLTO on, by default we want to link
829+
// to LLVM shared, to avoid re-doing ThinLTO (which happens in
830+
// the link step) with each stage.
836831
config.llvm_link_shared = true;
837832
}
838833
}

0 commit comments

Comments
 (0)