From 7d9d795af86b7b6e1317cfb496d9d9c570c3ef9a Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Wed, 19 May 2021 11:48:46 +0200 Subject: [PATCH] [HTML5] Fix GDNative compilation with emcc 2.0.19+ Add `WARN_ON_UNDEFINED_SYMBOLS=0` for the main module (which defines `godot_js_main` as extern coming from the "side" module, i.e. the main Godot binary). (cherry picked from commit 14c057eab605e8018a1ac7f98ed0f16faeabf9a2) --- platform/javascript/SCsub | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/javascript/SCsub b/platform/javascript/SCsub index 6b63eb9a325..c10d3bfd608 100644 --- a/platform/javascript/SCsub +++ b/platform/javascript/SCsub @@ -46,6 +46,7 @@ if env["gdnative_enabled"]: sys_env.Append(LINKFLAGS=["-s", "MAIN_MODULE=1"]) sys_env.Append(CCFLAGS=["-s", "EXPORT_ALL=1"]) sys_env.Append(LINKFLAGS=["-s", "EXPORT_ALL=1"]) + sys_env.Append(LINKFLAGS=["-s", "WARN_ON_UNDEFINED_SYMBOLS=0"]) # Force exporting the standard library (printf, malloc, etc.) sys_env["ENV"]["EMCC_FORCE_STDLIBS"] = "libc,libc++,libc++abi" # The main emscripten runtime, with exported standard libraries.