@@ -120,11 +120,13 @@ def build(self, host_target):
120
120
# and header paths from the sysroot
121
121
# https://github.com/llvm/llvm-project/blob/73ef397fcba35b7b4239c00bf3e0b4e689ca0add/clang/lib/Driver/ToolChains/WebAssembly.cpp#L29-L36
122
122
# 3. short_triple: The triple used by build-script to name the build directory
123
- for swift_host_triple , clang_multiarch_triple , short_triple , build_basename in [
124
- ('wasm32-unknown-wasi' , 'wasm32-wasi' , 'wasi-wasm32' , 'wasmstdlib' ),
125
- # TODO: Enable threads stdlib once sdk-generator supports multi-target SDK
126
- # ('wasm32-unknown-wasip1-threads', 'wasm32-wasip1-threads',
127
- # 'wasip1-threads-wasm32', 'wasmthreadsstdlib'),
123
+ for swift_host_triple , clang_multiarch_triple , short_triple , build_basename , build_sdk in [
124
+ ('wasm32-unknown-wasi' , 'wasm32-wasi' ,
125
+ 'wasi-wasm32' , 'wasmstdlib' , True ),
126
+ # FIXME: Enable build_sdk for threads once we will be able to
127
+ # unify Swift SDK archive for threads and non-threads.
128
+ ('wasm32-unknown-wasip1-threads' , 'wasm32-wasip1-threads' ,
129
+ 'wasip1-threads-wasm32' , 'wasmthreadsstdlib' , False ),
128
130
]:
129
131
stdlib_build_path = os .path .join (
130
132
build_root , '%s-%s' % (build_basename , host_target ))
@@ -133,7 +135,8 @@ def build(self, host_target):
133
135
package_path = self ._build_target_package (
134
136
swift_host_triple , short_triple , stdlib_build_path ,
135
137
llvm_runtime_libs_build_path , wasi_sysroot )
136
- target_packages .append ((swift_host_triple , wasi_sysroot , package_path ))
138
+ if build_sdk :
139
+ target_packages .append ((swift_host_triple , wasi_sysroot , package_path ))
137
140
138
141
swiftc_path = os .path .abspath (self .toolchain .swiftc )
139
142
toolchain_path = os .path .dirname (os .path .dirname (swiftc_path ))
0 commit comments