From 5e31a5821cba6d16694d592f7d25ae0cc8918779 Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Tue, 20 Feb 2024 08:19:56 -0500 Subject: [PATCH] Add `WASM_BIGINT` linker flag to the web build (cherry picked from commit 3ae524fa9e42828183f8046f6f33b945475bb052) --- platform/javascript/detect.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index ffaf681c9..9d022dd72 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -215,6 +215,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"])