Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[beta] Turn back on "fat" LTO by default #47548

Merged
merged 1 commit into from
Jan 21, 2018
Merged
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
12 changes: 9 additions & 3 deletions src/librustc/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,15 @@ impl Session {
return enabled
}

// If there's only one codegen unit and LTO isn't enabled then there's
// no need for ThinLTO so just return false.
if self.codegen_units() == 1 && !self.lto() {
// If LTO is enabled we right now unconditionally disable ThinLTO.
// This'll come at a later date! (full crate graph ThinLTO)
if self.lto() {
return false
}

// If there's only one codegen unit or then there's no need for ThinLTO
// so just return false.
if self.codegen_units() == 1 {
return false
}

Expand Down