File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -159,33 +159,36 @@ llvm_toolchain(
159159# Toolchain example for WebAssembly.
160160llvm_toolchain (
161161 name = "llvm_toolchain_wasm" ,
162+ libclang_rt = {
163+ "@libclang_rt_wasm32//:libclang_rt.builtins-wasm32.a" : "wasm32-unknown-unknown/libclang_rt.builtins.a" ,
164+ },
162165 # WebAssembly tests use a separate (newer) version of LLVM to exercise
163166 # support for experimental features such as wasm64.
164167 llvm_versions = {
165168 # The most recent LLVM as of 2024-10-17
166169 "" : "19.1.0" ,
167170 },
168- sysroot = {
169- "wasm32" : "@wasi_sdk_sysroots//wasm32-wasip2" ,
170- "wasm64" : "@wasi_sdk_sysroots//empty" ,
171- },
172171 stdlib = {
173172 "wasm32" : "libc" ,
174173 "wasm64" : "none" ,
175174 },
176- libclang_rt = {
177- "@libclang_rt_wasm32//:libclang_rt.builtins-wasm32.a" : "wasm32-unknown-unknown/libclang_rt.builtins.a" ,
175+ sysroot = {
176+ "wasm32" : "@wasi_sdk_sysroots//wasm32-wasip2" ,
177+ "wasm64" : "@wasi_sdk_sysroots//empty" ,
178178 },
179179)
180180
181181load (
182182 "@llvm_toolchain_wasm//:toolchains.bzl" ,
183183 llvm_register_toolchains_wasm = "llvm_register_toolchains" ,
184184)
185+
185186llvm_register_toolchains_wasm ()
186187
187188load ("//wasm:wasi_sdk.bzl" , "libclang_rt_wasm32" , "wasi_sdk_sysroots" )
189+
188190libclang_rt_wasm32 (name = "libclang_rt_wasm32" )
191+
189192wasi_sdk_sysroots (name = "wasi_sdk_sysroots" )
190193
191194## Test dependencies.
Original file line number Diff line number Diff line change @@ -629,7 +629,7 @@ def download_llvm(rctx):
629629 libclang_rt_content = rctx .read (libclang_rt )
630630 for clang_version in clang_versions :
631631 lib_path = clang_version .get_child ("lib" , lib_name )
632- rctx .file (lib_path , libclang_rt_content , legacy_utf8 = False )
632+ rctx .file (lib_path , libclang_rt_content , legacy_utf8 = False )
633633
634634 updated_attrs = _attr_dict (rctx .attr )
635635 if update_sha256 :
You can’t perform that action at this time.
0 commit comments