-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Remove -Zthinlto #144744
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
Remove -Zthinlto #144744
Conversation
This flag enables local ThinLTO, not full ThinLTO. It seems to be a remnant of when ThinLTO was originally introduced before -Clto=thin was supported. Local ThinLTO is already the default in release mode when -Clto is not passed and there is more than 1 codegen units. In debug mode or with 1 codegen unit local ThinLTO doesn't have any benefit, so there is no reason to support enabling it in that case anyway.
r? @davidtwco rustbot has assigned @davidtwco. Use |
This has a minor conflict with #144738 in a test. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@@ -1,4 +1,4 @@ | |||
//@ compile-flags: -Z thinlto -C codegen-units=8 | |||
//@ compile-flags: -Clto=thin -C codegen-units=8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To preserve behavior, shouldn't these drop the flag entirely? Otherwise they will switch from thin-local to thin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did then also have to pass -Copt-level=1
or higher. Otherwise LTO is disabled entirely.
I think changing some tests from local ThinLTO to ThinLTO is a bit risky after all. |
This flag enables local ThinLTO, not full ThinLTO. It seems to be a remnant of when ThinLTO was originally introduced before -Clto=thin was supported. Local ThinLTO is already the default in release mode when -Clto is not passed and there is more than 1 codegen units. In debug mode or with 1 codegen unit local ThinLTO doesn't have any benefit, so there is no reason to support enabling it in that case anyway.