Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_session/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,5 +539,5 @@ pub(crate) struct UnexpectedBuiltinCfg {
}

#[derive(Diagnostic)]
#[diag("ThinLTO is not supported by the codegen backend")]
#[diag("ThinLTO is not supported by the codegen backend, using fat LTO instead")]
pub(crate) struct ThinLtoNotSupportedByBackend;
4 changes: 2 additions & 2 deletions compiler/rustc_session/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,9 +620,9 @@ impl Session {
config::LtoCli::Thin => {
// The user explicitly asked for ThinLTO
if !self.thin_lto_supported {
// Backend doesn't support ThinLTO, disable LTO.
// Backend doesn't support ThinLTO, fallback to fat LTO.
self.dcx().emit_warn(errors::ThinLtoNotSupportedByBackend);
return config::Lto::No;
return config::Lto::Fat;
}
return config::Lto::Thin;
}
Expand Down
Loading