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)
164
164
"${CMAKE_C_FLAGS} ${directory_cflags} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UPPER} }" )
165
165
list (JOIN extra_cflags_list " " extra_cflags)
166
166
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
+
167
173
ExternalProject_Add(wasi-libc-${target}${target_suffix} -build
168
174
# Currently wasi-libc doesn't support out-of-tree builds so feign a
169
175
# "download command" which copies the source tree to a different location
@@ -180,6 +186,7 @@ function(define_wasi_libc_sub target target_suffix lto)
180
186
SYSROOT=${wasi_sysroot}
181
187
EXTRA_CFLAGS=${extra_cflags}
182
188
TARGET_TRIPLE=${target}
189
+ BUILTINS_LIB=${libcompiler_rt_a}
183
190
${extra_make_flags}
184
191
INSTALL_COMMAND ""
185
192
DEPENDS compiler-rt
You can’t perform that action at this time.
0 commit comments