-
Notifications
You must be signed in to change notification settings - Fork 34
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
build: Drop LTO by default #877
Conversation
Having `lto = true` came from the first git commit to this repository. I suspect it was copied from elsewhere. Having this enabled here makes an incremental (`CARGO_INCREMENTAL=1`) one-line change build take over a minute. Disabling it makes that same one-line change take a second. I think in general we should be deferring decisions like this to "outer" buildsystems; e.g. in Fedora Koji it makes sense to opt-in to full LTO.
Do note that LTO is only enabled for I'm not sure why you picked this one specifically, but we do have the same setup across other projects too. |
Well, the thing is that debug build performance can be really, really bad. I hit this when working on ostree-rs-ext stuff. We've turned lto off in release builds for rpm-ostree as of recently too. I agree though we should try to be consistent across repositories for this. |
We also recently did coreos/rpm-ostree#3999 As of recently, there is nicer cargo profile inheritance so we could try to globally add a For reference, https://cs.github.com/?scopeName=All+repos&scope=&q=%22lto+%3D+true%22+org%3Acoreos So my proposal is basically:
But again debug build performance is too poor in real world cases IMO to suggest using instead of |
By the way, if it is for one-off local builds I think it should be possible to finely override the LTO setting with |
Interesting. Yes, I could enable that in my dev environments by default. I tested this out with
and indeed it works. However, the tradeoffs with this are:
So, adjusted proposal:
|
From an out-of-band chat, there is consensus to turn off the currently enabled "fat" LTO across all our CoreOS projects. |
Having
lto = true
came from the first git commit to this repository. I suspect it was copied from elsewhere.Having this enabled here makes an incremental (
CARGO_INCREMENTAL=1
) one-line change build take over a minute.Disabling it makes that same one-line change take a second.
I think in general we should be deferring decisions like this to "outer" buildsystems; e.g. in Fedora Koji it makes sense to opt-in to full LTO.