Skip to content

Commit 3623c9d

Browse files
committed
Fix wasm-ld error
wasm-ld: error: --shared-memory is disallowed by build/emulate.o because it was not compiled with 'atomics' or 'bulk-memory' features.
1 parent d27bb3d commit 3623c9d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mk/wasm.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ OBJS_EXT += syscall_sdl.o
2626
LDFLAGS += -pthread
2727
endif
2828

29+
# setjmp/longjmp needs -pthread
30+
ifeq ($(call has, SYSTEM), 1)
31+
ifeq ($(call has, ELF_LOADER), 0)
32+
$(OUT)/emulate.o: CFLAGS += -pthread
33+
$(OUT)/syscall.o: CFLAGS += -pthread
34+
endif
35+
endif
36+
2937
# More build flags
3038
CFLAGS_emcc += -sINITIAL_MEMORY=2GB \
3139
-sALLOW_MEMORY_GROWTH \

0 commit comments

Comments
 (0)