Skip LTO in stage0 (again)

This commit is contained in:
Mark Rousskov 2022-12-28 15:28:09 -05:00
parent fbe0450251
commit cc4e434854

View File

@ -691,6 +691,9 @@ impl Step for Rustc {
));
}
// We currently don't support cross-crate LTO in stage0. This also isn't hugely necessary
// and may just be a time sink.
if compiler.stage != 0 {
match builder.config.rust_lto {
RustcLto::Thin | RustcLto::Fat => {
// Since using LTO for optimizing dylibs is currently experimental,
@ -709,6 +712,7 @@ impl Step for Rustc {
}
RustcLto::ThinLocal => { /* Do nothing, this is the default */ }
}
}
builder.info(&format!(
"Building stage{} compiler artifacts ({} -> {})",