-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix Thin LTO not working #22171
base: master
Are you sure you want to change the base?
Fix Thin LTO not working #22171
Conversation
That would be for |
@alexrp looks like one of the pipelines failed. Doesn't jump out to me as something introduced by this PR. Likely just needs a rerun. Let me know if you think otherwise |
src/Compilation/Config.zig
Outdated
.Debug => false, | ||
.ReleaseSafe, .ReleaseFast, .ReleaseSmall => true, | ||
.Debug => .none, | ||
.ReleaseSafe, .ReleaseFast, .ReleaseSmall => options.lto, |
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.
In this path, we're supposed to resolve a default value if the user has not provided one. We already checked options.lto != .none
above, so this can only possibly resolve to .none
.
This should probably be:
.ReleaseSafe, .ReleaseFast, .ReleaseSmall => options.lto, | |
.ReleaseSafe, .ReleaseFast, .ReleaseSmall => .full, |
We can consider later if the default should be switched to .thin
. I don't know if there are any major disadvantages to it that would make .full
a preferable default.
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.
@TCROC ping; I think this hunk is the only blocker for merging this.
It would also be nice to change |
Sounds like a plan! I look forward to testing your PR after this one goes through! :) |
This PR fixes this issue: #21947. I have tested compiling the Godot Game Engine with this PR: https://github.com/godotengine/godot
It compiles much faster and does not consume all of my memory! :)
This is vital for us to be able to add first class support for cross platform compilation in our godot-src project: https://github.com/lange-studios/godot-src
NOTE:
I am unsure of how to trigger the code path in
main.zig
in lines 1383 - 1396. If someone could give me instructions on how to trigger that code path or test themselves to confirm that code change works, that would be greatly appreciated!Thanks again for the awesome Zig! U all rock! :)