Web: Workaround Emscripten 3.1.42+ LTO regression

Fixes #80010.

(cherry picked from commit b064008c07)
This commit is contained in:
Rémi Verschelde 2023-09-05 14:56:53 +02:00
parent cb0ee90fde
commit c88a8f96b4
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 6 additions and 2 deletions

View file

@ -111,6 +111,10 @@ def configure(env):
else:
env.Append(CCFLAGS=["-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
if env["use_ubsan"]: