From d61c751015a74dd8d353a5042ddf5f3f47fab4ce Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 16 Sep 2025 07:08:16 -0700 Subject: [PATCH] Disable shared objects with threads --- cmake/wasi-sdk-sysroot.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/wasi-sdk-sysroot.cmake b/cmake/wasi-sdk-sysroot.cmake index 91aaaf1..c1837c9 100644 --- a/cmake/wasi-sdk-sysroot.cmake +++ b/cmake/wasi-sdk-sysroot.cmake @@ -148,10 +148,11 @@ function(define_wasi_libc_sub target target_suffix lto) set(extra_make_flags default) # If LTO is enabled then pass that on to wasi-libc, and otherwise make sure to - # build a `libc.so` dynamic library. + # build a `libc.so` dynamic library where possible (not compatible with + # threads though) if(lto) list(APPEND extra_make_flags LTO=full) - else() + elseif(NOT ${target} MATCHES threads) list(APPEND extra_make_flags libc_so) endif()