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

Web: Workaround Emscripten 3.1.42+ LTO regression #81340

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Sep 5, 2023

Fixes #80010.

Tested with Emscripten 3.1.45 and scons p=web target=template_release production=yes verbose=yes.

@akien-mga akien-mga added bug platform:web 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.0 cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Sep 5, 2023
@akien-mga akien-mga added this to the 4.2 milestone Sep 5, 2023
@akien-mga akien-mga requested a review from a team September 5, 2023 13:27
@akien-mga akien-mga requested a review from a team as a code owner September 5, 2023 13:27
@@ -16,7 +16,7 @@ concurrency:

jobs:
web-template:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't strictly needed, just a drive-by change as Ubuntu 20.04 will be EOL'ed by GH Actions eventually, and we have no reason to stick to the old version for Web builds.

Comment on lines +122 to +124
cc_version = get_compiler_version(env)
cc_semver = (int(cc_version["major"]), int(cc_version["minor"]), int(cc_version["patch"]))
if cc_semver >= (3, 1, 42):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll refactor this logic in #80719 after this is merged.

Copy link
Member Author

@akien-mga akien-mga Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed in the 3.x branch that we use tuple(get_compiler_version(env)) there, which is nicer. I'm changing it to that when cherry-picking, and for master I'll refactor later.

Edit: That can't be done for 4.x, there's more than just (major, minor, patch) in the dict.

Copy link
Collaborator

@Faless Faless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 !

@akien-mga akien-mga merged commit bceac8c into godotengine:master Sep 6, 2023
16 checks passed
@akien-mga akien-mga deleted the web-workaround-emscripten-3.1.42-lto-bug branch September 6, 2023 11:50
@akien-mga
Copy link
Member Author

Cherry-picked for 3.6.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Sep 6, 2023
@akien-mga
Copy link
Member Author

Cherry-picked for 3.5.3.

@akien-mga akien-mga removed the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Sep 6, 2023
akien-mga added a commit to akien-mga/godot that referenced this pull request Sep 18, 2023
The check needs to happen after we set `env["CXX"]`.
Follow-up to godotengine#81340.
@godotengine godotengine deleted a comment Sep 19, 2023
@godotengine godotengine deleted a comment Sep 19, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.2.

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Sep 20, 2023
YuriSizov pushed a commit to YuriSizov/godot that referenced this pull request Sep 20, 2023
The check needs to happen after we set `env["CXX"]`.
Follow-up to godotengine#81340.

(cherry picked from commit 5016180)
YuriSizov pushed a commit to YuriSizov/godot that referenced this pull request Sep 20, 2023
The check needs to happen after we set `env["CXX"]`.
Follow-up to godotengine#81340.

(cherry picked from commit 5016180)
JerryLi-lab pushed a commit to JerryLi-lab/godot that referenced this pull request Sep 21, 2023
The check needs to happen after we set `env["CXX"]`.
Follow-up to godotengine#81340.
BrunoArmondBraga pushed a commit to BrunoArmondBraga/godot that referenced this pull request Sep 24, 2023
The check needs to happen after we set `env["CXX"]`.
Follow-up to godotengine#81340.
akien-mga added a commit to akien-mga/godot that referenced this pull request Sep 24, 2023
The check needs to happen after we set `env["CXX"]`.
Follow-up to godotengine#81340.

(cherry picked from commit 5016180)
akien-mga added a commit that referenced this pull request Sep 24, 2023
The check needs to happen after we set `env["CXX"]`.
Follow-up to #81340.

(cherry picked from commit 5016180)
Occalepsus pushed a commit to Occalepsus/godot that referenced this pull request Sep 25, 2023
The check needs to happen after we set `env["CXX"]`.
Follow-up to godotengine#81340.
mandryskowski pushed a commit to mandryskowski/godot that referenced this pull request Oct 11, 2023
The check needs to happen after we set `env["CXX"]`.
Follow-up to godotengine#81340.
akien-mga added a commit to akien-mga/godot that referenced this pull request Oct 30, 2023
The check needs to happen after we set `env["CXX"]`.
Follow-up to godotengine#81340.

(cherry picked from commit 5016180)
garychia pushed a commit to garychia/godot that referenced this pull request Nov 9, 2023
The check needs to happen after we set `env["CXX"]`.
Follow-up to godotengine#81340.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiling Godot web export template with LTO fails with Emscripten 3.1.42+
3 participants