Skip to content
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

SCons: Pass optimization flags to the linker too, needed by Emscripten #94109

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Jul 8, 2024

Needs testing with various compilers to confirm that it doesn't have a negative impact / cause errors to pass those to the linker for MSVC, GCC, and Clang.

From a quick test with GCC, both with and without LTO, it didn't seem to make a difference in my tests.

@akien-mga akien-mga added bug topic:buildsystem cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Jul 8, 2024
@akien-mga akien-mga added this to the 4.3 milestone Jul 8, 2024
@akien-mga akien-mga requested a review from a team as a code owner July 8, 2024 23:18
@Repiteo
Copy link
Contributor

Repiteo commented Jul 9, 2024

Doesn't look like the MSVC linker can use the optimization flags

@akien-mga
Copy link
Member Author

Doesn't look like the MSVC linker can use the optimization flags

I tried to use ChatGPT as a "read tech docs for me and summarize it", but sounds like I wasn't critical enough of its claim that those flags impact MSVC whole-program optimization :P

@akien-mga akien-mga merged commit 543f694 into godotengine:master Jul 10, 2024
18 checks passed
@akien-mga akien-mga deleted the scons-linker-optflags branch July 10, 2024 22:29
@akien-mga
Copy link
Member Author

Just pointing out the regression in #94725 for myself, so I don't cherry-pick this change before we've solved that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release topic:buildsystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web build/Emscripten needs optimization flags passed to the linker too (LINKFLAGS)
2 participants