Skip to content

Commit 021e8dc

Browse files
committed
Add Clang builtins for threads targets
This change adds the `libclang_rt.builtins-wasm32.a` to the appropriate Clang directory for the threaded variants of the WASI targets (`lib/wasi-threads`, `lib/wasip1-threads`). This fixes #543.
1 parent 5e04cd8 commit 021e8dc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmake/wasi-sdk-sysroot.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,14 @@ add_custom_target(compiler-rt-post-build
9393
COMMAND ${CMAKE_COMMAND} -E copy_directory
9494
${clang_resource_dir}/include ${wasi_resource_dir}/include
9595

96-
# Copy the `lib/wasi` folder to `libc/wasi{p1,p2}` to ensure that those
97-
# OS-strings also work for looking up the compiler-rt.a file.
96+
# Copy the `lib/wasi` folder to `libc/wasi{p1,p2}{-threads}?` to ensure that
97+
# those OS-strings also work for looking up the compiler-rt.a file.
98+
COMMAND ${CMAKE_COMMAND} -E copy_directory
99+
${wasi_resource_dir}/lib/wasi ${wasi_resource_dir}/lib/wasi-threads
98100
COMMAND ${CMAKE_COMMAND} -E copy_directory
99101
${wasi_resource_dir}/lib/wasi ${wasi_resource_dir}/lib/wasip1
102+
COMMAND ${CMAKE_COMMAND} -E copy_directory
103+
${wasi_resource_dir}/lib/wasi ${wasi_resource_dir}/lib/wasip1-threads
100104
COMMAND ${CMAKE_COMMAND} -E copy_directory
101105
${wasi_resource_dir}/lib/wasi ${wasi_resource_dir}/lib/wasip2
102106

0 commit comments

Comments
 (0)