From cc12c69ea10f40f0f47f90885760500163f5f2f3 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 3 May 2022 21:44:09 +0200 Subject: [PATCH] [JS] Add flag to disable weak symbols in ZSTD. Weak symbols are currently broken in upstream emscripten. (cherry picked from commit 070bd87aaaf7a15ad9d2d839182f14d5c352153b) --- platform/javascript/detect.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index eb298337a29..dda113b394d 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -201,6 +201,8 @@ def configure(env): sys.exit(255) env.Append(CCFLAGS=["-s", "RELOCATABLE=1"]) env.Append(LINKFLAGS=["-s", "RELOCATABLE=1"]) + # Weak symbols are broken upstream: https://github.com/emscripten-core/emscripten/issues/12819 + env.Append(CPPDEFINES=["ZSTD_HAVE_WEAK_SYMBOLS=0"]) env.extra_suffix = ".gdnative" + env.extra_suffix # Reduce code size by generating less support code (e.g. skip NodeJS support).