1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Web: Workaround Emscripten 3.1.42+ LTO regression

Fixes #80010.
This commit is contained in:
Rémi Verschelde
2023-09-05 14:56:53 +02:00
parent e7208420bc
commit b064008c07
2 changed files with 7 additions and 2 deletions

View File

@@ -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"]: