Web: Workaround Emscripten 3.1.42+ LTO regression
Fixes #80010.
(cherry picked from commit b064008c07
)
This commit is contained in:
parent
cb0ee90fde
commit
c88a8f96b4
2 changed files with 6 additions and 2 deletions
4
.github/workflows/javascript_builds.yml
vendored
4
.github/workflows/javascript_builds.yml
vendored
|
@ -7,7 +7,7 @@ env:
|
||||||
# Only used for the cache key. Increment version to force clean build.
|
# Only used for the cache key. Increment version to force clean build.
|
||||||
GODOT_BASE_BRANCH: 3.x
|
GODOT_BASE_BRANCH: 3.x
|
||||||
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||||
EM_VERSION: 3.1.18
|
EM_VERSION: 3.1.45
|
||||||
EM_CACHE_FOLDER: "emsdk-cache"
|
EM_CACHE_FOLDER: "emsdk-cache"
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
|
@ -16,7 +16,7 @@ concurrency:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
javascript-template:
|
javascript-template:
|
||||||
runs-on: "ubuntu-20.04"
|
runs-on: "ubuntu-22.04"
|
||||||
name: Template (target=release, tools=no)
|
name: Template (target=release, tools=no)
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -111,6 +111,10 @@ def configure(env):
|
||||||
else:
|
else:
|
||||||
env.Append(CCFLAGS=["-flto"])
|
env.Append(CCFLAGS=["-flto"])
|
||||||
env.Append(LINKFLAGS=["-flto"])
|
env.Append(LINKFLAGS=["-flto"])
|
||||||
|
# Workaround https://github.com/emscripten-core/emscripten/issues/19781.
|
||||||
|
cc_semver = tuple(get_compiler_version(env))
|
||||||
|
if cc_semver >= (3, 1, 42):
|
||||||
|
env.Append(LINKFLAGS=["-Wl,-u,scalbnf"])
|
||||||
|
|
||||||
# Sanitizers
|
# Sanitizers
|
||||||
if env["use_ubsan"]:
|
if env["use_ubsan"]:
|
||||||
|
|
Loading…
Reference in a new issue