File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,12 @@ function(define_wasi_libc_sub target target_suffix lto)
164164 "${CMAKE_C_FLAGS} ${directory_cflags} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UPPER} }" )
165165 list (JOIN extra_cflags_list " " extra_cflags)
166166
167+ if (${target} MATCHES threads)
168+ set (libcompiler_rt_a ${wasi_resource_dir} /lib/wasm32-unknown-wasip1-threads/libclang_rt.builtins.a)
169+ else ()
170+ set (libcompiler_rt_a ${wasi_resource_dir} /lib/wasm32-unknown-wasip1/libclang_rt.builtins.a)
171+ endif ()
172+
167173 ExternalProject_Add(wasi-libc-${target}${target_suffix} -build
168174 # Currently wasi-libc doesn't support out-of-tree builds so feign a
169175 # "download command" which copies the source tree to a different location
@@ -180,6 +186,7 @@ function(define_wasi_libc_sub target target_suffix lto)
180186 SYSROOT=${wasi_sysroot}
181187 EXTRA_CFLAGS=${extra_cflags}
182188 TARGET_TRIPLE=${target}
189+ BUILTINS_LIB=${libcompiler_rt_a}
183190 ${extra_make_flags}
184191 INSTALL_COMMAND ""
185192 DEPENDS compiler-rt
You can’t perform that action at this time.
0 commit comments