From 463dc2544bcaf11096c284efcb7e4205bdb18a54 Mon Sep 17 00:00:00 2001 From: Sy Brand Date: Wed, 24 Jun 2026 13:04:46 +0100 Subject: [PATCH] Add option for coop threading --- cmake/wasi-sdk-sysroot.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/wasi-sdk-sysroot.cmake b/cmake/wasi-sdk-sysroot.cmake index 6e02539..1b28417 100644 --- a/cmake/wasi-sdk-sysroot.cmake +++ b/cmake/wasi-sdk-sysroot.cmake @@ -25,6 +25,7 @@ option(WASI_SDK_INCLUDE_TESTS "Whether or not to build tests by default" OFF) option(WASI_SDK_INSTALL_TO_CLANG_RESOURCE_DIR "Whether or not to modify the compiler's resource directory" OFF) option(WASI_SDK_LTO "Whether or not to build LTO assets" ON) option(WASI_SDK_EXCEPTIONS "Whether or not C++ exceptions are enabled" OFF) +option(WASI_SDK_COOP_THREADING "Whether or not to build with cooperative threading support" OFF) set(WASI_SDK_CPU_CFLAGS "-mcpu=lime1" CACHE STRING "CFLAGS to specify wasm features to enable") set(wasi_tmp_install ${CMAKE_CURRENT_BINARY_DIR}/install) @@ -174,6 +175,7 @@ function(define_wasi_libc_sub target target_suffix lto) -DUSE_WASM_COMPONENT_LD=OFF -DWASI_SDK_VERSION=${wasi_sdk_version} -DBUILD_TESTS=ON + -DENABLE_COOP_THREADS=${WASI_SDK_COOP_THREADING} DEPENDS compiler-rt EXCLUDE_FROM_ALL ON USES_TERMINAL_CONFIGURE ON