Browse Source

Add workaround for emscripten >= 3.1.47 LTO build

(cherry picked from commit 656bc22e283852a55ad1317048649f0991bc7dcd)
Adam Scott 1 year ago
parent
commit
00e3aa9b07
1 changed files with 3 additions and 0 deletions
  1. 3 0
      platform/web/detect.py

+ 3 - 0
platform/web/detect.py

@@ -210,6 +210,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 cc_semver < (3, 1, 14):