|
12 | 12 | # See the License for the specific language governing permissions and
|
13 | 13 | # limitations under the License.
|
14 | 14 |
|
15 |
| -load("@bazel-zig-cc//toolchain:defs.bzl", zig_register_toolchains = "register_toolchains") |
16 | 15 | load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
|
| 16 | +load("@envoy_toolshed//sysroot:sysroot.bzl", "setup_sysroots") |
17 | 17 | load("@proxy_wasm_cpp_host//bazel/cargo/wasmsign/remote:crates.bzl", wasmsign_crate_repositories = "crate_repositories")
|
18 | 18 | load("@proxy_wasm_cpp_host//bazel/cargo/wasmtime/remote:crates.bzl", wasmtime_crate_repositories = "crate_repositories")
|
19 | 19 | load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
|
20 | 20 | load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
|
21 | 21 | load("@rules_rust//rust:repositories.bzl", "rust_repositories", "rust_repository_set")
|
| 22 | +load("@toolchains_llvm//toolchain:deps.bzl", "bazel_toolchain_dependencies") |
| 23 | +load("@toolchains_llvm//toolchain:rules.bzl", "llvm_toolchain") |
22 | 24 |
|
23 | 25 | def proxy_wasm_cpp_host_dependencies():
|
24 | 26 | # Bazel extensions.
|
@@ -52,14 +54,39 @@ def proxy_wasm_cpp_host_dependencies():
|
52 | 54 | )
|
53 | 55 | crate_universe_dependencies(bootstrap = True)
|
54 | 56 |
|
55 |
| - zig_register_toolchains( |
56 |
| - version = "0.9.1", |
57 |
| - url_format = "https://ziglang.org/download/{version}/zig-{host_platform}-{version}.tar.xz", |
58 |
| - host_platform_sha256 = { |
59 |
| - "linux-aarch64": "5d99a39cded1870a3fa95d4de4ce68ac2610cca440336cfd252ffdddc2b90e66", |
60 |
| - "linux-x86_64": "be8da632c1d3273f766b69244d80669fe4f5e27798654681d77c992f17c237d7", |
61 |
| - "macos-aarch64": "8c473082b4f0f819f1da05de2dbd0c1e891dff7d85d2c12b6ee876887d438287", |
62 |
| - "macos-x86_64": "2d94984972d67292b55c1eb1c00de46580e9916575d083003546e9a01166754c", |
| 57 | + setup_sysroots() |
| 58 | + bazel_toolchain_dependencies() |
| 59 | + llvm_toolchain( |
| 60 | + name = "llvm_toolchain", |
| 61 | + llvm_version = "19.1.0", |
| 62 | + sha256 = { |
| 63 | + "linux-x86_64": "cee77d641690466a193d9b88c89705de1c02bbad46bde6a3b126793c0a0f2923", |
| 64 | + "linux-aarch64": "7bb54afd330fe1a1c2d4c593fa1e2dbe2abd9bf34fb3597994ff41e443cf144b", |
| 65 | + "darwin-aarch64": "9da86f64a99f5ce9b679caf54e938736ca269c5e069d0c94ad08b995c5f25c16", |
| 66 | + "darwin-x86_64": "264f2f1e8b67f066749349ae8b4943d346cd44e099464164ef21b42a57663540", |
| 67 | + }, |
| 68 | + strip_prefix = { |
| 69 | + "linux-x86_64": "LLVM-19.1.0-Linux-X64", |
| 70 | + "linux-aarch64": "clang+llvm-19.1.0-aarch64-linux-gnu", |
| 71 | + "darwin-aarch64": "LLVM-19.1.0-macOS-ARM64", |
| 72 | + "darwin-x86_64": "LLVM-19.1.0-macOS-X64", |
| 73 | + }, |
| 74 | + urls = { |
| 75 | + "linux-x86_64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-Linux-X64.tar.xz"], |
| 76 | + "linux-aarch64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/clang+llvm-19.1.0-aarch64-linux-gnu.tar.xz"], |
| 77 | + "darwin-aarch64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-macOS-ARM64.tar.xz"], |
| 78 | + "darwin-x86_64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-macOS-X64.tar.xz"], |
| 79 | + }, |
| 80 | + ) |
| 81 | + |
| 82 | + llvm_toolchain( |
| 83 | + name = "llvm_aarch64", |
| 84 | + llvm_version = "19.1.0", |
| 85 | + toolchain_roots = { |
| 86 | + "": "@llvm_toolchain_llvm//", |
| 87 | + }, |
| 88 | + sysroot = { |
| 89 | + "linux-aarch64": "@sysroot_linux_arm64//:sysroot", |
63 | 90 | },
|
64 | 91 | )
|
65 | 92 |
|
|
0 commit comments