瀏覽代碼

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

Add workaround for emscripten >= 3.1.47 LTO build
Rémi Verschelde 1 年之前
父節點
當前提交
843c350cca
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      platform/web/detect.py

+ 3 - 0
platform/web/detect.py

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