-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Windows: Configure MinGW LTO with -fno-use-linker-plugin -fwhole-program
#103077
Windows: Configure MinGW LTO with -fno-use-linker-plugin -fwhole-program
#103077
Conversation
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.
This should set the flags we tested. LGTM
I put the flags on the wrong branch, they apply for LLVM and not GCC :D |
…gram` - Works around and closes godotengine#102867. - Works around and closes godotengine#102982. Co-authored-by: Hein-Pieter van Braam-Stewart <[email protected]>
f74c894
to
702eb39
Compare
Test build from this PR: https://editor.godotengine.org/testing/4.4.rc1-test-lto-whole-program/ |
Tested on Windows 10, can confirm it fixes the issue |
Tested too on Linux with Wine (both win32 and win64 builds) and the MRP from #102982 works. Let's merge, test in 4.4.rc1 and see if there are any other downsides to these new flags. |
Thanks @hpvb for looking into this! |
I think this broke my build pipeline. This is how I build my windows production build:
Using MinGW64 running on Fedora 41:
Output of build process:
I am using an scu build with maximum limit because I hope the compiler is able to perform the maximal level of optimization this way. With beta4 it worked, but now it's throwing "file too big" errors. When I build with the same settings, but without scu enabled, everything builds fine. |
This was actually found by @hpvb in #102867 (comment).
Paging them to better description what this does when they have some time, as it's not super clear to me how those two options interact with
-flto
. But tests have shown that it solves the two linked issues.I'll make a test build from this PR to validate this and get others to test.