Emscripten : -pthread support.

This commit is contained in:
Jean-François DEL NERO
2025-01-02 23:27:29 +01:00
parent 8d0db0a096
commit 016855fe12
5 changed files with 41 additions and 5 deletions
+6
View File
@@ -9,6 +9,8 @@ DEBUG ?= 0
DEBUG_ASAN ?= 0
DEBUG_INFOS ?= 0
PTHREAD ?= 0
ifeq ($(DEBUG), 1)
CFLAGS =-O0 $(INCLUDES) -Wall -DDEBUG
LDFLAGS =
@@ -76,6 +78,10 @@ endif
ifeq ($(TARGET), Emscripten)
CFLAGS +=
LDFLAGS += -static-libgcc
ifeq ($(PTHREAD), 1)
CFLAGS += -pthread
LDFLAGS += -pthread -sPTHREAD_POOL_SIZE=4 -sTOTAL_MEMORY=64MB
endif
CC = emcc
EXEC = hxcfe.wasm
LIBHXCFE = libhxcfe.a