fix some libnh wasm build issues
emcc: error: linker setting ignored during compilation: 'ASSERTIONS' [-Wunused-command-line-argument] [-Werror]
make[1]: *** [Makefile:1306: ../targets/wasm/allmain.o] Error 1
wasm-ld: error: ../targets/wasm/version.o: undefined symbol: nomakedefs
These ones look like actual NetHack issues that this particular compile is catching due to
default -Wunused-but-set-variable.
In the interest of time today, I mostly resorted to using nhUse() on them for now, but a
follow-up by someone might be useful.
options.c:6069:13: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]
boolean ret = FALSE;
^
restore.c:903:9: error: variable 'len' set but not used [-Werror,-Wunused-but-set-variable]
int len = 0;
^
uhitm.c:4539:43: error: variable 'nsum' set but not used [-Werror,-Wunused-but-set-variable]
int i, tmp, armorpenalty, sum[NATTK], nsum = MM_MISS,
^
This commit is contained in:
@@ -42,10 +42,10 @@ dospkg: $(GAMEBIN) $(TARGETPFX)recover.exe ../dat/nhtiles.bmp
|
||||
endif # CROSS_TO_MSDOS
|
||||
|
||||
ifdef CROSS_TO_WASM
|
||||
$(WASM_TARGET): pregame $(HOSTOBJ) $(HOBJ) $(LUACROSSLIB) $(WASM_DATA_DIR)
|
||||
$(WASM_TARGET): pregame $(TARGETPFX)date.o $(HOSTOBJ) $(HOBJ) $(LUACROSSLIB) $(WASM_DATA_DIR)
|
||||
-rm $@
|
||||
$(TARGET_CC) $(TARGET_LFLAGS) $(TARGET_CFLAGS) -o $@ \
|
||||
$(HOBJ) $(TARGET_LIBS)
|
||||
$(HOBJ) $(TARGETPFX)date.o $(TARGET_LIBS)
|
||||
|
||||
$(WASM_DATA_DIR): $(WASM_DATA_DIR)/nhdat
|
||||
touch $(WASM_DATA_DIR)/perm
|
||||
|
||||
Reference in New Issue
Block a user