diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2023-09-06 13:50:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-06 13:50:39 +0200 |
commit | bceac8c34f2cd6f9f156b3b1b9cbd012bc45d928 (patch) | |
tree | c99f7b00869d6b7fba19c763fa52e5ccc54f49c1 | |
parent | 0a7f75ec7b465604b6496c8f5f1d638aed250d6d (diff) | |
parent | b064008c07be856d6f3a5079d11746137e03ede5 (diff) | |
download | redot-engine-bceac8c34f2cd6f9f156b3b1b9cbd012bc45d928.tar.gz |
Merge pull request #81340 from akien-mga/web-workaround-emscripten-3.1.42-lto-bug
Web: Workaround Emscripten 3.1.42+ LTO regression
-rw-r--r-- | .github/workflows/web_builds.yml | 4 | ||||
-rw-r--r-- | platform/web/detect.py | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/.github/workflows/web_builds.yml b/.github/workflows/web_builds.yml index 47baf3d065..6de6eeaf2e 100644 --- a/.github/workflows/web_builds.yml +++ b/.github/workflows/web_builds.yml @@ -7,7 +7,7 @@ env: # Used for the cache key. Add version suffix to force clean build. GODOT_BASE_BRANCH: master SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no - EM_VERSION: 3.1.18 + EM_VERSION: 3.1.45 EM_CACHE_FOLDER: "emsdk-cache" concurrency: @@ -16,7 +16,7 @@ concurrency: jobs: web-template: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" name: Template (target=template_release) steps: diff --git a/platform/web/detect.py b/platform/web/detect.py index 4015c8ff16..7b2e5646d6 100644 --- a/platform/web/detect.py +++ b/platform/web/detect.py @@ -118,6 +118,11 @@ def configure(env: "Environment"): else: env.Append(CCFLAGS=["-flto"]) env.Append(LINKFLAGS=["-flto"]) + # Workaround https://github.com/emscripten-core/emscripten/issues/19781. + 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): + env.Append(LINKFLAGS=["-Wl,-u,scalbnf"]) # Sanitizers if env["use_ubsan"]: |