-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathMODULE.bazel
More file actions
55 lines (46 loc) · 1.74 KB
/
Copy pathMODULE.bazel
File metadata and controls
55 lines (46 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module(
name = "rust_icu",
version = "6.0.0",
)
bazel_dep(name = "rules_cc", version = "0.1.0")
bazel_dep(name = "rules_rust", version = "0.73.0")
bazel_dep(name = "rules_foreign_cc", version = "0.15.1")
bazel_dep(name = "toolchains_llvm", version = "1.8.0")
bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.3", dev_dependency = True)
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
# LLVM 15.0.6 remains the toolchain everywhere the CI presubmit runs (Linux).
#
# macOS needs a newer one. LLVM 15 predates the current macOS SDKs, and its
# `ld64.lld` cannot read their text-based `.tbd` stub libraries, so every Rust
# link fails before any rust_icu code is reached:
#
# ld64.lld: error: MacOSX26.5.sdk/usr/lib/libSystem.tbd(libSystem.B.dylib)
# is incompatible with arm64 (macOS)
#
# The `llvm_versions` keys below override only the Darwin hosts; the "" entry
# keeps every other platform on the version the presubmit already validates.
llvm.toolchain(
llvm_versions = {
"": "15.0.6",
"darwin-aarch64": "21.1.8",
"darwin-x86_64": "21.1.8",
},
)
use_repo(llvm, "llvm_toolchain")
register_toolchains("@llvm_toolchain//:all")
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2021",
versions = ["1.82.0"],
)
use_repo(rust, "rust_toolchains")
register_toolchains("@rust_toolchains//:all")
icu_ext = use_extension("//bazel:icu_deps.bzl", "icu_deps")
use_repo(icu_ext, "icu_74", "icu_75", "icu_76", "icu_77", "icu_tot")
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
crate.from_cargo(
name = "crates",
cargo_lockfile = "//:Cargo.lock",
manifests = ["//:Cargo.toml"],
)
use_repo(crate, "crates")