Merge pull request #87956 from adamscott/fix-emscripten-lto-build

Add workaround for emscripten >= 3.1.47 LTO build
This commit is contained in:
Rémi Verschelde 2024-02-05 18:05:26 +01:00
commit 843c350cca
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 0 deletions

View File

@ -229,6 +229,9 @@ def configure(env: "Environment"):
# Workaround https://github.com/emscripten-core/emscripten/issues/19781.
if cc_semver >= (3, 1, 42) and cc_semver < (3, 1, 46):
env.Append(LINKFLAGS=["-Wl,-u,scalbnf"])
# Workaround https://github.com/emscripten-core/emscripten/issues/16836.
if cc_semver >= (3, 1, 47):
env.Append(LINKFLAGS=["-Wl,-u,_emscripten_run_callback_on_thread"])
if env["dlink_enabled"]:
if env["proxy_to_pthread"]: