-
-
Notifications
You must be signed in to change notification settings - Fork 593
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
Add lto scons option #1601
Add lto scons option #1601
Conversation
Not sure why the windows builds are failing. I don't have this problem with any of my git runners. If this is related to the PR, we can default to no LTO on windows. Let me know what you think. |
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.
Looking good overall 🚀 (haven't tested a build yet).
Some changes are needed to match the default values with upstream godot.
Code-wise, this seems to be getting there! However:
|
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.
The code looks correct, but the commit message seems wrong?
The message states:
Add lto scons option, defaulting to "auto" ("full" in production, "none" in dev builds).
But there is no "production" option, and the default is none
.
Right, i forgot to change the final commit message after the changes. Should be good now! |
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.
LGTM! Nice work!
Thanks! |
The behavior mimics almost the exact behavior (minus "progress" options) of Godot scons:
This is an active change (edit: not anymore, defaults to 'none' by default now): Once merged, all projects depending on godot-cpp (and updating the submodule) will gain LTO for release builds. I tested a similar setup in my own project, not the exact same though (because I don't have all combinations of windows, msvc, mingw and use_llvm available). However, since that it mimics what Godot does already, it should be good, given I did not make mistakes.
One important difference is that in my implementation (edit: not anymore, consistently 'none' by default now), "auto" is consistent across platforms ("full" in production, "none" in dev). I saw small, but consistent gains in all platforms, and don't see why LTO should be avoided in some platforms by default.