浏览代码

Add `WASM_BIGINT` linker flag to the web build

(cherry picked from commit 3ae524fa9e42828183f8046f6f33b945475bb052)
Adam Scott 1 年之前
父节点
当前提交
b11c95dc98
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      platform/web/detect.py

+ 4 - 0
platform/web/detect.py

@@ -220,6 +220,10 @@ def configure(env: "Environment"):
         env.Append(LINKFLAGS=["-s", "SIDE_MODULE=2"])
         env.extra_suffix = ".dlink" + env.extra_suffix
 
+    # WASM_BIGINT is needed since emscripten ≥ 3.1.41
+    if cc_semver >= (3, 1, 41):
+        env.Append(LINKFLAGS=["-s", "WASM_BIGINT"])
+
     # Reduce code size by generating less support code (e.g. skip NodeJS support).
     env.Append(LINKFLAGS=["-s", "ENVIRONMENT=web,worker"])