|
1 | | ---- a/MODULE.bazel 2025-12-11 15:32:06.556883760 -0800 |
2 | | -+++ b/MODULE.bazel 2025-12-11 15:32:06.556900451 -0800 |
3 | | -@@ -51,537 +51,3 @@ |
| 1 | +--- a/MODULE.bazel 2025-12-15 20:29:50.750242486 +0000 |
| 2 | ++++ b/MODULE.bazel 2025-12-15 20:29:50.750242486 +0000 |
| 3 | +@@ -58,252 +58,3 @@ |
4 | 4 | # HACK: In prod the includer's patch inserts the use_repo for multitool. This |
5 | 5 | # solves the problem of needing a use_repo here in prod and below in dev. |
6 | 6 |
|
|
36 | 36 | -# from bazel/include/llvm.MODULE.bazel |
37 | 37 | -# LLVM configuration |
38 | 38 | - |
39 | | --bazel_dep(name = "toolchains_llvm", version = "1.4.0") |
40 | | --single_version_override( |
41 | | -- module_name = "toolchains_llvm", |
| 39 | +-bazel_dep(name = "toolchains_llvm_bootstrapped", version = "0.2.5", dev_dependency = True) |
| 40 | +-archive_override( |
| 41 | +- module_name = "toolchains_llvm_bootstrapped", |
| 42 | +- integrity = "sha256-eFiVi7+nC2ILQZSs2U1qUf1ocY6AtvR0CDrEKyjnHPY=", |
42 | 43 | - patch_strip = 1, |
43 | 44 | - patches = [ |
44 | | -- "//bazel/patches:toolchains_llvm.patch", |
| 45 | +- "//bazel/patches:llvm_darwin_sysroot.patch", |
45 | 46 | - ], |
| 47 | +- strip_prefix = "toolchains_llvm_bootstrapped-36b46cebf6b738b5c2ab653291176d5a9bfe0fe1", |
| 48 | +- urls = ["https://github.com/cerisier/toolchains_llvm_bootstrapped/archive/36b46cebf6b738b5c2ab653291176d5a9bfe0fe1/master.tar.gz"], |
46 | 49 | -) |
47 | 50 | - |
48 | | --llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True) |
49 | | -- |
50 | | --execution_oses = [ |
51 | | -- "macos", |
52 | | -- "linux", |
53 | | --] |
54 | | -- |
55 | | --execution_cpus = [ |
56 | | -- "aarch64", |
57 | | -- "x86_64", |
58 | | --] |
59 | | -- |
60 | | --[ |
61 | | -- [ |
62 | | -- llvm.toolchain( |
63 | | -- name = "llvm_toolchain_{}_{}".format(exec_os, exec_cpu), |
64 | | -- exec_arch = exec_cpu, |
65 | | -- exec_os = exec_os if exec_os != "macos" else "darwin", |
66 | | -- llvm_version = "20.1.2", |
67 | | -- ), |
68 | | -- llvm.sysroot( |
69 | | -- name = "llvm_toolchain_{}_{}".format(exec_os, exec_cpu), |
70 | | -- label = "@org_chromium_sysroot_linux_x86_64//:sysroot", |
71 | | -- targets = ["linux-x86_64"], |
72 | | -- ), |
73 | | -- llvm.sysroot( |
74 | | -- name = "llvm_toolchain_{}_{}".format(exec_os, exec_cpu), |
75 | | -- label = "@org_chromium_sysroot_linux_arm64//:sysroot", |
76 | | -- targets = ["linux-aarch64"], |
77 | | -- ), |
78 | | -- llvm.sysroot( |
79 | | -- name = "llvm_toolchain_{}_{}".format(exec_os, exec_cpu), |
80 | | -- label = "@sysroot_darwin_universal//:sysroot", |
81 | | -- targets = [ |
82 | | -- "darwin-aarch64", |
83 | | -- "darwin-x86_64", |
84 | | -- ], |
85 | | -- ), |
86 | | -- use_repo(llvm, "llvm_toolchain_{}_{}".format(exec_os, exec_cpu)), |
87 | | -- ] |
88 | | -- for exec_os in execution_oses |
89 | | -- for exec_cpu in execution_cpus |
90 | | --] |
91 | | -- |
92 | | --http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
93 | | -- |
94 | | --_SYSROOT_LINUX_BUILD_FILE = """\ |
95 | | --filegroup( |
96 | | -- name = "sysroot", |
97 | | -- srcs = glob(["*/**"]), |
98 | | -- visibility = ["//visibility:public"], |
99 | | --) |
100 | | --""" |
101 | | -- |
102 | | --http_archive( |
103 | | -- name = "org_chromium_sysroot_linux_arm64", |
104 | | -- build_file_content = _SYSROOT_LINUX_BUILD_FILE, |
105 | | -- sha256 = "b199942a0bd9c34800e8d7b669778ef45f2054b9f106039439383dd66efcef31", |
106 | | -- urls = ["https://github.com/DavidZbarsky-at/sysroot-min/releases/download/v0.0.20/debian_bullseye_arm64_sysroot.tar.xz"], |
107 | | --) |
108 | | -- |
109 | | --http_archive( |
110 | | -- name = "org_chromium_sysroot_linux_x86_64", |
111 | | -- build_file_content = _SYSROOT_LINUX_BUILD_FILE, |
112 | | -- sha256 = "b279dd2926e7d3860bb4e134997a45df5106f680e160a959b945580ba4ec755f", |
113 | | -- urls = ["https://github.com/DavidZbarsky-at/sysroot-min/releases/download/v0.0.20/debian_bullseye_amd64_sysroot.tar.xz"], |
114 | | --) |
115 | | -- |
116 | | --http_archive( |
117 | | -- name = "sysroot_darwin_universal", |
118 | | -- build_file_content = """ |
119 | | --filegroup( |
120 | | -- name = "sysroot", |
121 | | -- srcs = glob( |
122 | | -- include = ["**"], |
123 | | -- exclude = ["**/*:*"], |
124 | | -- ), |
125 | | -- visibility = ["//visibility:public"], |
126 | | --) |
127 | | --""", |
128 | | -- integrity = "sha256-9qzGIJ251Wtn/K+R7B3v5Ici6esT3CH7kc/s6xSJ5X4=", |
129 | | -- # The ruby header has an infinite symlink that we need to remove. |
130 | | -- patch_cmds = ["rm System/Library/Frameworks/Ruby.framework/Versions/Current/Headers/ruby/ruby"], |
131 | | -- strip_prefix = "MacOSX14.5.sdk", |
132 | | -- urls = ["https://github.com/alexey-lysiuk/macos-sdk/releases/download/14.5/MacOSX14.5.tar.xz"], |
| 51 | +-register_toolchains( |
| 52 | +- "@toolchains_llvm_bootstrapped//toolchain:all", |
133 | 53 | -) |
134 | 54 | - |
135 | | --target_oses = [ |
136 | | -- "macos", |
137 | | -- "linux", |
138 | | --] |
139 | | -- |
140 | | --target_cpus = [ |
141 | | -- "aarch64", |
142 | | -- "x86_64", |
143 | | --] |
144 | | -- |
145 | | --platforms = [ |
146 | | -- { |
147 | | -- "exec_os": exec_os, |
148 | | -- "exec_cpu": exec_cpu, |
149 | | -- "tgt_os": tgt_os, |
150 | | -- "tgt_cpu": tgt_cpu, |
151 | | -- } |
152 | | -- for exec_os in execution_oses |
153 | | -- for exec_cpu in execution_cpus |
154 | | -- for tgt_os in target_oses |
155 | | -- for tgt_cpu in target_cpus |
156 | | --] |
157 | | -- |
158 | | --[register_toolchains("//bazel/platforms/toolchains:{}_{}_{}_{}_llvm".format( |
159 | | -- p["exec_os"], |
160 | | -- p["exec_cpu"], |
161 | | -- p["tgt_os"], |
162 | | -- p["tgt_cpu"], |
163 | | --)) for p in platforms] |
164 | | -- |
165 | 55 | -######################################## |
166 | 56 | -# from bazel/include/rust.MODULE.bazel |
167 | 57 | -# Rust configuration |
168 | 58 | - |
169 | | --bazel_dep(name = "rules_rust", version = "0.67.0") |
170 | | -- |
171 | | --RUST_EDITION = "2024" |
172 | | -- |
173 | | --RUST_VERSION = "1.88.0" |
| 59 | +-bazel_dep(name = "rules_rust", version = "0.68.1") |
174 | 60 | - |
175 | 61 | -rust = use_extension( |
176 | 62 | - "@rules_rust//rust:extensions.bzl", |
177 | 63 | - "rust", |
178 | 64 | -) |
179 | | -- |
180 | | --# These override the default rust_repository_sets created by rust_register_toolchain. They must be named exactly as follows. |
181 | | --# NB: The first call for a particular name may set the `edition`, `exec_triple`, and `versions` attributes, the subsequent calls should not set it or else Bazel will fail with, |
182 | | --# "Error in fail: You must only set edition on the first call to repository_set for a particular name but it was set multiple times for rust_linux_x86_64" |
183 | | --# "Error in fail: You must only set exec_triple on the first call to repository_set for a particular name but it was set multiple times for rust_linux_x86_64" |
184 | | --# "Error in fail: You must only set versions on the first call to repository_set for a particular name but it was set multiple times for rust_linux_x86_64" |
185 | | -- |
186 | | --# Execution platform : linux x86 (x86_64-unknown-linux-gnu) |
187 | | --# -> linux x86_64 (gnu) |
188 | | --rust.repository_set( |
189 | | -- name = "rust_linux_x86_64", |
190 | | -- edition = RUST_EDITION, # "edition" only set in first instance of "rust_linux_x86_64" repository_set (see comment above) |
191 | | -- exec_triple = "x86_64-unknown-linux-gnu", # "exec_triple" only set in first instance of "rust_linux_x86_64" repository_set (see comment above) |
192 | | -- target_compatible_with = [ |
193 | | -- "//bazel/platforms/linkers:unknown", |
194 | | -- "@platforms//cpu:x86_64", |
195 | | -- "@platforms//os:linux", |
196 | | -- ], |
197 | | -- target_triple = "x86_64-unknown-linux-gnu", |
198 | | -- versions = [RUST_VERSION], # "versions" only set in first instance of "rust_linux_x86_64" repository_set (see comment above) |
199 | | --) |
200 | | -- |
201 | | --# -> linux x86_64 (musl) |
202 | | --rust.repository_set( |
203 | | -- name = "rust_linux_x86_64", |
204 | | -- target_compatible_with = [ |
205 | | -- "//bazel/platforms/linkers:unknown", |
206 | | -- "@platforms//cpu:x86_64", |
207 | | -- "@platforms//os:linux", |
208 | | -- ], |
209 | | -- target_triple = "x86_64-unknown-linux-musl", |
210 | | --) |
211 | | -- |
212 | | --# -> linux arm (musl) |
213 | | --rust.repository_set( |
214 | | -- name = "rust_linux_x86_64", |
215 | | -- target_compatible_with = [ |
216 | | -- "//bazel/platforms/linkers:unknown", |
217 | | -- "@platforms//cpu:arm64", |
218 | | -- "@platforms//os:linux", |
219 | | -- ], |
220 | | -- target_triple = "aarch64-unknown-linux-musl", |
221 | | --) |
222 | | -- |
223 | | --# -> darwin x86 |
224 | | --rust.repository_set( |
225 | | -- name = "rust_linux_x86_64", |
226 | | -- target_compatible_with = [ |
227 | | -- "@platforms//cpu:x86_64", |
228 | | -- "@platforms//os:macos", |
229 | | -- ], |
230 | | -- target_triple = "x86_64-apple-darwin", |
231 | | --) |
232 | | -- |
233 | | --# -> darwin arm |
234 | | --rust.repository_set( |
235 | | -- name = "rust_linux_x86_64", |
236 | | -- target_compatible_with = [ |
237 | | -- "@platforms//cpu:arm64", |
238 | | -- "@platforms//os:macos", |
239 | | -- ], |
240 | | -- target_triple = "aarch64-apple-darwin", |
241 | | --) |
242 | | -- |
243 | | --# Execution platform : linux arm (aarch64-unknown-linux-gnu) |
244 | | --# -> linux arm (gnu) |
245 | | --rust.repository_set( |
246 | | -- name = "rust_linux_aarch64", |
247 | | -- edition = RUST_EDITION, # "edition" only set in first instance of "rust_linux_aarch64" repository_set (see comment above) |
248 | | -- exec_triple = "aarch64-unknown-linux-gnu", # "exec_triple" only set in first instance of "rust_linux_aarch64" repository_set (see comment above) |
249 | | -- target_compatible_with = [ |
250 | | -- "//bazel/platforms/linkers:unknown", |
251 | | -- "@platforms//cpu:aarch64", |
252 | | -- "@platforms//os:linux", |
253 | | -- ], |
254 | | -- target_triple = "aarch64-unknown-linux-gnu", |
255 | | -- versions = [RUST_VERSION], # "versions" only set in first instance of "rust_linux_aarch64" repository_set (see comment above) |
256 | | --) |
257 | | -- |
258 | | --# -> linux arm (musl) |
259 | | --rust.repository_set( |
260 | | -- name = "rust_linux_aarch64", |
261 | | -- target_compatible_with = [ |
262 | | -- "//bazel/platforms/linkers:unknown", |
263 | | -- "@platforms//cpu:aarch64", |
264 | | -- "@platforms//os:linux", |
265 | | -- ], |
266 | | -- target_triple = "aarch64-unknown-linux-musl", |
267 | | --) |
268 | | -- |
269 | | --# Execution platform : darwin x86 (x86_64-apple-darwin) |
270 | | --# -> linux x86 (musl) |
271 | | --rust.repository_set( |
272 | | -- name = "rust_darwin_x86_64", |
273 | | -- edition = RUST_EDITION, # "edition" only set in first instance of "rust_darwin_x86_64" repository_set (see comment above) |
274 | | -- exec_triple = "x86_64-apple-darwin", # "exec_triple" only set in first instance of "rust_darwin_x86_64" repository_set (see comment above) |
275 | | -- target_compatible_with = [ |
276 | | -- "//bazel/platforms/linkers:unknown", |
277 | | -- "@platforms//cpu:x86_64", |
278 | | -- "@platforms//os:linux", |
279 | | -- ], |
280 | | -- target_triple = "x86_64-unknown-linux-musl", |
281 | | -- versions = [RUST_VERSION], # "versions" only set in first instance of "rust_darwin_x86_64" repository_set (see comment above) |
282 | | --) |
283 | | -- |
284 | | --# -> linux arm (musl) |
285 | | --rust.repository_set( |
286 | | -- name = "rust_darwin_x86_64", |
287 | | -- target_compatible_with = [ |
288 | | -- "//bazel/platforms/linkers:unknown", |
289 | | -- "@platforms//cpu:arm64", |
290 | | -- "@platforms//os:linux", |
291 | | -- ], |
292 | | -- target_triple = "aarch64-unknown-linux-musl", |
293 | | --) |
294 | | -- |
295 | | --# -> darwin x86 |
296 | | --rust.repository_set( |
297 | | -- name = "rust_darwin_x86_64", |
298 | | -- target_compatible_with = [ |
299 | | -- "@platforms//cpu:x86_64", |
300 | | -- "@platforms//os:macos", |
301 | | -- ], |
302 | | -- target_triple = "x86_64-apple-darwin", |
303 | | --) |
304 | | -- |
305 | | --# -> darwin arm |
306 | | --rust.repository_set( |
307 | | -- name = "rust_darwin_x86_64", |
308 | | -- target_compatible_with = [ |
309 | | -- "@platforms//cpu:arm64", |
310 | | -- "@platforms//os:macos", |
311 | | -- ], |
312 | | -- target_triple = "aarch64-apple-darwin", |
313 | | --) |
314 | | -- |
315 | | --# Execution platform : darwin arm (aarch64-apple-darwin) |
316 | | --# -> linux x86 (musl) |
317 | | --rust.repository_set( |
318 | | -- name = "rust_darwin_aarch64", |
319 | | -- edition = RUST_EDITION, # "edition" only set in first instance of "rust_darwin_aarch64" repository_set (see comment above) |
320 | | -- exec_triple = "aarch64-apple-darwin", # "exec_triple" only set in first instance of "rust_darwin_aarch64" repository_set (see comment above) |
321 | | -- target_compatible_with = [ |
322 | | -- "//bazel/platforms/linkers:unknown", |
323 | | -- "@platforms//cpu:x86_64", |
324 | | -- "@platforms//os:linux", |
325 | | -- ], |
326 | | -- target_triple = "x86_64-unknown-linux-musl", |
327 | | -- versions = [RUST_VERSION], # "versions" only set in first instance of "rust_darwin_aarch64" repository_set (see comment above) |
328 | | --) |
329 | | -- |
330 | | --# -> linux arm (musl) |
331 | | --rust.repository_set( |
332 | | -- name = "rust_darwin_aarch64", |
333 | | -- target_compatible_with = [ |
334 | | -- "//bazel/platforms/linkers:unknown", |
335 | | -- "@platforms//cpu:arm64", |
336 | | -- "@platforms//os:linux", |
337 | | -- ], |
338 | | -- target_triple = "aarch64-unknown-linux-musl", |
339 | | --) |
340 | | -- |
341 | | --# -> darwin x86 |
342 | | --rust.repository_set( |
343 | | -- name = "rust_darwin_aarch64", |
344 | | -- target_compatible_with = [ |
345 | | -- "@platforms//cpu:x86_64", |
346 | | -- "@platforms//os:macos", |
347 | | -- ], |
348 | | -- target_triple = "x86_64-apple-darwin", |
349 | | --) |
350 | | -- |
351 | | --# -> darwin arm |
352 | | --rust.repository_set( |
353 | | -- name = "rust_darwin_aarch64", |
354 | | -- target_compatible_with = [ |
355 | | -- "@platforms//cpu:arm64", |
356 | | -- "@platforms//os:macos", |
| 65 | +-rust.toolchain( |
| 66 | +- edition = "2024", |
| 67 | +- extra_target_triples = [ |
| 68 | +- "aarch64-apple-darwin", |
| 69 | +- "x86_64-apple-darwin", |
| 70 | +- "aarch64-unknown-linux-musl", |
| 71 | +- "x86_64-unknown-linux-musl", |
357 | 72 | - ], |
358 | | -- target_triple = "aarch64-apple-darwin", |
| 73 | +- versions = ["1.88.0"], |
359 | 74 | -) |
360 | 75 | -use_repo(rust, "rust_toolchains") |
361 | 76 | - |
|
369 | 84 | -bazel_dep(name = "xz", version = "5.4.5.bcr.5") |
370 | 85 | -bazel_dep(name = "zstd", version = "1.5.7") |
371 | 86 | -bazel_dep(name = "bzip2", version = "1.0.8.bcr.3") |
372 | | --bazel_dep(name = "rules_rs", version = "0.0.7") |
| 87 | +-bazel_dep(name = "rules_rs", version = "0.0.16") |
373 | 88 | - |
374 | 89 | -crate = use_extension( |
375 | 90 | - "@rules_rs//rs:extensions.bzl", |
|
381 | 96 | - cargo_toml = "//:Cargo.toml", |
382 | 97 | - platform_triples = [ |
383 | 98 | - "aarch64-apple-darwin", |
384 | | -- "aarch64-unknown-linux-gnu", |
| 99 | +- "aarch64-unknown-linux-musl", |
385 | 100 | - "x86_64-apple-darwin", |
386 | | -- "x86_64-unknown-linux-gnu", |
| 101 | +- "x86_64-unknown-linux-musl", |
387 | 102 | - ], |
388 | 103 | -) |
389 | 104 | -crate.annotation( |
|
0 commit comments