diff options
author | Adam Scott <ascott.ca@gmail.com> | 2024-02-20 08:19:56 -0500 |
---|---|---|
committer | Adam Scott <ascott.ca@gmail.com> | 2024-02-20 08:19:56 -0500 |
commit | 3ae524fa9e42828183f8046f6f33b945475bb052 (patch) | |
tree | e7afd2b2f9ca3fef46f285c64a2fa06184af6538 /platform/web | |
parent | b7145638d5b235e8e1b2fe039a0cee48a4bbb26d (diff) | |
download | redot-engine-3ae524fa9e42828183f8046f6f33b945475bb052.tar.gz |
Add `WASM_BIGINT` linker flag to the web build
Diffstat (limited to 'platform/web')
-rw-r--r-- | platform/web/detect.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/web/detect.py b/platform/web/detect.py index 7d9b1de6b7..e692c79a20 100644 --- a/platform/web/detect.py +++ b/platform/web/detect.py @@ -253,6 +253,9 @@ def configure(env: "SConsEnvironment"): env.Append(LINKFLAGS=["-fvisibility=hidden"]) env.extra_suffix = ".dlink" + env.extra_suffix + # WASM_BIGINT is needed since emscripten ≥ 3.1.41 + needs_wasm_bigint = cc_semver >= (3, 1, 41) + # Run the main application in a web worker if env["proxy_to_pthread"]: env.Append(LINKFLAGS=["-s", "PROXY_TO_PTHREAD=1"]) @@ -261,6 +264,9 @@ def configure(env: "SConsEnvironment"): # https://github.com/emscripten-core/emscripten/issues/18034#issuecomment-1277561925 env.Append(LINKFLAGS=["-s", "TEXTDECODER=0"]) # BigInt support to pass object pointers between contexts + needs_wasm_bigint = True + + if needs_wasm_bigint: env.Append(LINKFLAGS=["-s", "WASM_BIGINT"]) # Reduce code size by generating less support code (e.g. skip NodeJS support). |