Use wasi-sdk 20 pre-release for tests with threads (#2021)
`wasi-sdk-20` pre-release can be used to avoid building `wasi-libc` to enable threads. It's not possible to use `wasi-sdk-20` pre-release on Ubuntu 20.04 because of incompatibility with the glibc version: ```bash /opt/wasi-sdk/bin/clang: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /opt/wasi-sdk/bin/clang) ```
This commit is contained in:
@ -11,7 +11,10 @@ if (NOT DEFINED WASI_SDK_DIR)
|
||||
set (WASI_SDK_DIR "/opt/wasi-sdk")
|
||||
endif ()
|
||||
|
||||
set (CMAKE_SYSROOT "${WASI_SYSROOT}")
|
||||
if (DEFINED WASI_SYSROOT)
|
||||
set (CMAKE_SYSROOT "${WASI_SYSROOT}")
|
||||
endif ()
|
||||
|
||||
set (CMAKE_C_COMPILER "${WASI_SDK_DIR}/bin/clang")
|
||||
set (CMAKE_ASM_COMPILER "${WASI_SDK_DIR}/bin/clang")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "-target wasm32-wasi-threads")
|
||||
|
||||
Reference in New Issue
Block a user