@@ -34,7 +34,7 @@ endif()
3434
3535message (CHECK_START "Detecting WASI_TOOLCHAIN_FILE at ${WASI_SDK_DIR} " )
3636find_file (WASI_TOOLCHAIN_FILE
37- wasi-sdk.cmake
37+ wasi-sdk-pthread .cmake
3838 PATHS "${WASI_SDK_DIR} /share/cmake"
3939 NO_DEFAULT_PATH
4040 NO_CMAKE_FIND_ROOT_PATH
4646endif ()
4747
4848if (WASI_TOOLCHAIN_FILE-NOTFOUND )
49- message (FATAL_ERROR "Can not find wasi-sdk.cmake under ${WASI_SDK_DIR} " )
49+ message (FATAL_ERROR "Can not find wasi-sdk-pthread .cmake under ${WASI_SDK_DIR} " )
5050endif ()
5151
5252message (CHECK_START "Detecting WASI_SYS_ROOT at ${WASI_SDK_DIR} " )
@@ -80,10 +80,7 @@ ExternalProject_Add(wasm-app
8080 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /wasm-src
8181 UPDATE_COMMAND ""
8282 PATCH_COMMAND ""
83- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy
84- ${CMAKE_CURRENT_SOURCE_DIR} /../../wamr-sdk/app/libc-builtin-sysroot/include /pthread.h
85- ${CMAKE_CURRENT_SOURCE_DIR} /wasm-src/inc
86- && ${CMAKE_COMMAND}
83+ CONFIGURE_COMMAND ${CMAKE_COMMAND}
8784 -DWASI_SDK_PREFIX=${WASI_SDK_DIR}
8885 -DCMAKE_TOOLCHAIN_FILE=${WASI_TOOLCHAIN_FILE}
8986 -DCMAKE_SYSROOT=${WASI_SYS_ROOT}
@@ -170,8 +167,8 @@ set(WAMR_BUILD_AOT 1)
170167set (WAMR_BUILD_JIT 0)
171168set (WAMR_BUILD_LIBC_BUILTIN 1)
172169set (WAMR_BUILD_LIBC_WASI 1)
173- set (WAMR_BUILD_LIB_PTHREAD 1)
174170set (WAMR_BUILD_REF_TYPES 1)
171+ set (WAMR_BUILD_LIB_WASI_THREADS 1)
175172
176173# compiling and linking flags
177174if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang" ))
0 commit comments