-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
fixed order in SConstruct #65583
fixed order in SConstruct #65583
Conversation
The behavior you describe is intentional, at least on some platforms like Windows MSVC and macOS/iOS/Android where we don't want to enable LTO by default because it's either worse than no LTO, or not tested well enough to prove its benefit. If you do want to use LTO anyway, you can specify it with the |
ah I see. I could |
Well the fact that So I don't think anything needs to be changed, or I don't understand what the actual problem is that you're trying to solve. |
Oh I understand the problem now, the LTO config isn't respected. That's a bug indeed. Probably the |
ok. I'll try to add a smart platform dependent check before applying the default value for lto |
cfe7c13
to
7a44aff
Compare
…commended platforms
7a44aff
to
495a9b1
Compare
now this should be better |
This looks mostly good, but I'm not fond of adding a dedicated method for this which duplicates what is already done in if env.msvc:
print(
"WARNING: For `production` Windows builds, you should use MinGW with GCC "
"or Clang instead of Visual Studio, as they can better optimize the "
"GDScript VM in a very significant way. MSVC LTO also doesn't work "
"reliably for our use case."
"If you want to use MSVC nevertheless for production builds, set "
"`debug_symbols=no lto=none` instead of the `production=yes` option."
)
Exit(255) So I made #65745 to fix this issue, I think moving the |
Reopening for now as I'm not 100% my solution is better, need to dig deeper. |
…faults Fixup to godotengine#63288. See godotengine#65583 for the bug report. Co-authored-by: Cyberrebell <[email protected]>
I think #65745 should be good, in the end I had to implement something not unlike what you originally attempted. Sorry for coming full circle :D |
Superseded by #65745. |
…faults Fixup to godotengine#63288. See godotengine#65583 for the bug report. Co-authored-by: Cyberrebell <[email protected]> (cherry picked from commit 35a15e6)
…faults Fixup to godotengine#63288. See godotengine#65583 for the bug report. Co-authored-by: Cyberrebell <[email protected]> (cherry picked from commit 35a15e6)
In #63288 the LTO handling was improved but the default value for LTO wouldn't effect the build.
Without my changes if you add
production=yes
but no lto argument the platform specific configure() function is called with lto=none and will add no lto compiler flags. After configure() lto will be defaulted to full and print "Using LTO: full" but in fact the compiler will run without LTO as the compiler flags were set before.