Skip to content

Commit

Permalink
Add Clang builtins for threads targets
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
abrown committed Oct 10, 2024
1 parent cec5cf4 commit 9096f4b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmake/wasi-sdk-sysroot.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,14 @@ add_custom_target(compiler-rt-post-build
COMMAND ${CMAKE_COMMAND} -E copy_directory
${clang_resource_dir}/include ${wasi_resource_dir}/include

# Copy the `lib/wasi` folder to `libc/wasi{p1,p2}` to ensure that those
# OS-strings also work for looking up the compiler-rt.a file.
# Copy the `lib/wasi` folder to `libc/wasi{p1,p2}{-threads}?` to ensure that
# those OS-strings also work for looking up the compiler-rt.a file.
COMMAND ${CMAKE_COMMAND} -E copy_directory
${wasi_resource_dir}/lib/wasi ${wasi_resource_dir}/lib/wasi-threads
COMMAND ${CMAKE_COMMAND} -E copy_directory
${wasi_resource_dir}/lib/wasi ${wasi_resource_dir}/lib/wasip1
COMMAND ${CMAKE_COMMAND} -E copy_directory
${wasi_resource_dir}/lib/wasi ${wasi_resource_dir}/lib/wasip1-threads
COMMAND ${CMAKE_COMMAND} -E copy_directory
${wasi_resource_dir}/lib/wasi ${wasi_resource_dir}/lib/wasip2

Expand Down

0 comments on commit 9096f4b

Please sign in to comment.