From b43b035321dc7ee7d0234a941822e84aaf847726 Mon Sep 17 00:00:00 2001 From: Adam Powers Date: Mon, 19 Oct 2020 13:22:02 -0700 Subject: [PATCH] fix wasm runtime errors --- sys/unix/hints/include/cross-pre.2020 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/unix/hints/include/cross-pre.2020 b/sys/unix/hints/include/cross-pre.2020 index 73eec2337..562a1934d 100644 --- a/sys/unix/hints/include/cross-pre.2020 +++ b/sys/unix/hints/include/cross-pre.2020 @@ -29,6 +29,8 @@ endif ifdef CROSS_TO_WASM CROSS=1 BUILD_TARGET_LUA=1 +HACKDIR=/ +PREFIX= override TARGET = wasm override TARGETDIR=../targets/$(TARGET) override TARGETPFX = $(TARGETDIR)/ @@ -309,7 +311,7 @@ EMCC_LFLAGS += -s ALLOW_TABLE_GROWTH EMCC_LFLAGS += -s ASYNCIFY -s ASYNCIFY_IMPORTS='["local_callback"]' EMCC_LFLAGS += -O3 EMCC_LFLAGS += -s MODULARIZE -EMCC_LFLAGS += -s EXPORTED_FUNCTIONS='["_main", "_shim_graphics_set_callback"]' +EMCC_LFLAGS += -s EXPORTED_FUNCTIONS='["_main", "_shim_graphics_set_callback", "_mapglyph", "_display_inventory"]' EMCC_LFLAGS += -s EXPORTED_RUNTIME_METHODS='["cwrap", "ccall", "addFunction", \ "removeFunction", "UTF8ToString", "getValue", "setValue"]' EMCC_LFLAGS += -s ERROR_ON_UNDEFINED_SYMBOLS=0 @@ -323,7 +325,7 @@ EMCC_LFLAGS += --embed-file $(WASM_DATA_DIR)@/ EMCC_CFLAGS = EMCC_CFLAGS += -Wall EMCC_CFLAGS += -Werror -EMCC_CFLAGS +EMCC_CFLAGS += -DNO_SIGNAL #EMCC_CFLAGS += -s DISABLE_EXCEPTION_CATCHING=0 #EMCC_DEBUG_CFLAGS += -s ASSERTIONS=1 EMCC_DEBUG_CFLAGS += -s ASSERTIONS=2