File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,38 @@ llvm_toolchain(
156
156
urls = {"" : ["https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz" ]},
157
157
)
158
158
159
+ # Toolchain example for WebAssembly.
160
+ llvm_toolchain (
161
+ name = "llvm_toolchain_wasm" ,
162
+ # WebAssembly tests use a separate (newer) version of LLVM to exercise
163
+ # support for experimental features such as wasm64.
164
+ llvm_versions = {
165
+ # The most recent LLVM as of 2024-10-17
166
+ "" : "19.1.0" ,
167
+ },
168
+ sysroot = {
169
+ "wasm32" : "@wasi_sdk_sysroots//wasm32-wasip2" ,
170
+ "wasm64" : "@wasi_sdk_sysroots//empty" ,
171
+ },
172
+ stdlib = {
173
+ "wasm32" : "libc" ,
174
+ "wasm64" : "none" ,
175
+ },
176
+ libclang_rt = {
177
+ "@libclang_rt_wasm32//:libclang_rt.builtins-wasm32.a" : "wasm32-unknown-unknown/libclang_rt.builtins.a" ,
178
+ },
179
+ )
180
+
181
+ load (
182
+ "@llvm_toolchain_wasm//:toolchains.bzl" ,
183
+ llvm_register_toolchains_wasm = "llvm_register_toolchains" ,
184
+ )
185
+ llvm_register_toolchains_wasm ()
186
+
187
+ load ("//wasm:wasi_sdk.bzl" , "libclang_rt_wasm32" , "wasi_sdk_sysroots" )
188
+ libclang_rt_wasm32 (name = "libclang_rt_wasm32" )
189
+ wasi_sdk_sysroots (name = "wasi_sdk_sysroots" )
190
+
159
191
## Test dependencies.
160
192
161
193
# Well known repos; present here only for testing.
You can’t perform that action at this time.
0 commit comments