From a671234483277e1b193583ece1582b34d7e67faa Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Sun, 4 Feb 2024 15:24:24 -0500 Subject: [PATCH] Add workaround for emscripten >= 3.1.47 LTO build (cherry picked from commit 656bc22e283852a55ad1317048649f0991bc7dcd) --- platform/javascript/detect.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 68f47b40390..c3e99e777a7 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -206,6 +206,9 @@ def configure(env): # 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["gdnative_enabled"]: if cc_semver < (2, 0, 10):