]> granicus.if.org Git - nethack/commitdiff
fix wasm runtime errors
authorAdam Powers <apowers@ato.ms>
Mon, 19 Oct 2020 20:22:02 +0000 (13:22 -0700)
committerAdam Powers <apowers@ato.ms>
Mon, 19 Oct 2020 20:22:02 +0000 (13:22 -0700)
sys/unix/hints/include/cross-pre.2020

index 73eec2337113ca3276a915ddff8c65978722f654..562a1934de671081571d282103346abad57987db 100644 (file)
@@ -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