Browse Source

Add `WASM_BIGINT` linker flag to the web build

(cherry picked from commit 3ae524fa9e42828183f8046f6f33b945475bb052)
Adam Scott 1 year ago
parent
commit
9bcdcccb36
1 changed files with 4 additions and 0 deletions
  1. 4 0
      platform/javascript/detect.py

+ 4 - 0
platform/javascript/detect.py

@@ -220,6 +220,10 @@ def configure(env):
         env.Append(CPPDEFINES=["ZSTD_HAVE_WEAK_SYMBOLS=0"])
         env.extra_suffix = ".gdnative" + 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"])