From a4c3e915be0b075658021e9fa43c3a2d3c1584d7 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sun, 13 Mar 2022 13:18:15 +0100 Subject: [PATCH 1/2] Added missing signature. --- platform/javascript/js/libs/library_godot_display.js | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/javascript/js/libs/library_godot_display.js b/platform/javascript/js/libs/library_godot_display.js index 54d48643db6..5997631bf8a 100644 --- a/platform/javascript/js/libs/library_godot_display.js +++ b/platform/javascript/js/libs/library_godot_display.js @@ -462,6 +462,7 @@ const GodotDisplay = { GodotRuntime.setHeapValue(height, window.screen.height * scale, 'i32'); }, + godot_js_display_window_size_get__sig: 'vii', godot_js_display_window_size_get: function (p_width, p_height) { GodotRuntime.setHeapValue(p_width, GodotConfig.canvas.width, 'i32'); GodotRuntime.setHeapValue(p_height, GodotConfig.canvas.height, 'i32'); From 070bd87aaaf7a15ad9d2d839182f14d5c352153b Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 3 May 2022 21:44:09 +0200 Subject: [PATCH 2/2] [JS] Add flag to disable weak symbols in ZSTD. Weak symbols are currently broken in upstream emscripten. --- platform/javascript/detect.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index b6be44fbb2d..709104c5eeb 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -212,6 +212,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).