@@ -27,8 +27,8 @@ set(CMAKE_STRIP "${WASI_SDK_PATH}/bin/llvm-strip")
2727
2828# Set WASI sysroot and target
2929set (CMAKE_SYSROOT "${WASI_SDK_PATH} /share/wasi-sysroot" )
30- set (CMAKE_C_COMPILER_TARGET "wasm32-wasi-threads " )
31- set (CMAKE_CXX_COMPILER_TARGET "wasm32-wasi-threads " )
30+ set (CMAKE_C_COMPILER_TARGET "wasm32-wasi" )
31+ set (CMAKE_CXX_COMPILER_TARGET "wasm32-wasi" )
3232
3333set (CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY" )
3434set (CMAKE_C_COMPILER_WORKS "1" )
@@ -90,7 +90,7 @@ option(DISABLE_NANBOX "Disable nanbox" OFF)
9090option (ENABLE_CODECACHE "Enable code cache" OFF )
9191option (CACHE_PROFILE "Enable cache profile" OFF )
9292option (ENABLE_MEM "Enable memory detection" OFF )
93- option (ENABLE_ATOMICS "Enable Atomics" ON )
93+ option (ENABLE_ATOMICS "Enable Atomics" OFF )
9494option (FORCE_GC "Enable force gc" OFF )
9595option (ENABLE_ASAN "Enable address sanitizer" OFF )
9696option (ENABLE_BIGNUM "Enable bignum" OFF )
@@ -110,6 +110,7 @@ add_compile_options(
110110 -D_WASI_EMULATED_MMAN
111111 -D_WASI_EMULATED_SIGNAL
112112 -D_WASI_EMULATED_PROCESS_CLOCKS
113+ -DWASI_STACK_SIZE=${WASM_STACK_SIZE}
113114)
114115
115116# Simplify for WASI
@@ -122,7 +123,7 @@ set(CMAKE_COMMON_FLAGS
122123 "${OPTIMIZATION_FLAGS} -fPIC -ffunction-sections -fdata-sections \
123124 -fno-short-enums -fno-strict-aliasing -Wall -Wextra -Wno-unused-parameter \
124125 -Wno-unused-function -faddrsig -Wno-c99-designator -Wno-unknown-warning-option \
125- -Wno-sign-compare -Wno-unused-but-set-variable -pthread -matomics - msimd128 -mmultivalue -mmutable-globals -mtail-call -msign-ext -mbulk-memory -mnontrapping-fptoint -mextended-const" )
126+ -Wno-sign-compare -Wno-unused-but-set-variable -msimd128 -mmultivalue -mmutable-globals -mtail-call -msign-ext -mbulk-memory -mnontrapping-fptoint -mextended-const" )
126127
127128if (ENABLE_ASAN)
128129 add_definitions (-DHAKO_SANITIZE_LEAK )
@@ -281,7 +282,7 @@ set_target_properties(quickjs PROPERTIES
281282
282283# Add WASI-specific link options to the QuickJS library
283284target_link_options (quickjs PRIVATE
284- "-Wl,--allow-undefined -Wl,wasi-emulated-signal -Wl,wasi-emulated-process-clocks -Wl,--shared-memory " )
285+ "-Wl,--allow-undefined -Wl,wasi-emulated-signal -Wl,wasi-emulated-process-clocks" )
285286
286287# Build the hako WASM module
287288set (hako_source
@@ -311,7 +312,6 @@ target_include_directories(hako_reactor PRIVATE
311312# WASM-specific link options
312313target_link_options (hako_reactor PRIVATE
313314 -mexec-model=reactor
314- -Wl,--import-memory,--export-memory
315315 -Wl,--no-entry
316316 -Wl,--export=malloc
317317 -Wl,--export=free
0 commit comments