| Jan Schär | 22bea75 | 2025-07-03 07:17:11 +0000 | [diff] [blame^] | 1 | RUSTC_EFI_FLAGS = [ |
| 2 | # Disable generation of PDB file to make build reproducible. Otherwise, |
| 3 | # the PDB file contains a non-deterministic path like |
| 4 | # /tmp/rustc0VgeF3/symbols.o, and the binary contains a hash of the PDB |
| 5 | # file. See https://github.com/rust-lang/rust/issues/112587 |
| 6 | "-Clink-arg=/DEBUG:none", |
| 7 | ] |
| 8 | |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 9 | rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") |
| 10 | rust.toolchain( |
| 11 | edition = "2021", |
| Jan Schär | 22bea75 | 2025-07-03 07:17:11 +0000 | [diff] [blame^] | 12 | extra_rustc_flags_triples = { |
| 13 | "x86_64-unknown-uefi": RUSTC_EFI_FLAGS, |
| 14 | "aarch64-unknown-uefi": RUSTC_EFI_FLAGS, |
| 15 | }, |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 16 | extra_target_triples = [ |
| 17 | "x86_64-unknown-uefi", |
| Jan Schär | 56248c1 | 2025-05-05 13:34:18 +0000 | [diff] [blame] | 18 | "aarch64-unknown-uefi", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 19 | ], |
| Tim Windelschmidt | 9eab31c | 2024-10-23 12:33:36 +0200 | [diff] [blame] | 20 | versions = ["1.82.0"], |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 21 | ) |
| 22 | use_repo(rust, "rust_toolchains") |
| 23 | |
| 24 | crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate") |
| 25 | crate.from_cargo( |
| 26 | name = "crate_index", |
| 27 | cargo_lockfile = "//third_party/rust:Cargo.lock", |
| 28 | generate_binaries = True, |
| 29 | manifests = ["//third_party/rust:Cargo.toml"], |
| Tim Windelschmidt | 74a2331 | 2025-02-10 23:12:24 +0100 | [diff] [blame] | 30 | supported_platform_triples = [ |
| 31 | "x86_64-unknown-linux-gnu", |
| 32 | ], |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 33 | ) |
| 34 | crate.from_cargo( |
| 35 | name = "crate_index_efi", |
| 36 | cargo_lockfile = "//third_party/rust_efi:Cargo.lock", |
| 37 | generate_binaries = True, |
| 38 | manifests = ["//third_party/rust_efi:Cargo.toml"], |
| 39 | supported_platform_triples = [ |
| 40 | "x86_64-unknown-linux-gnu", |
| 41 | "x86_64-unknown-uefi", |
| Jan Schär | 56248c1 | 2025-05-05 13:34:18 +0000 | [diff] [blame] | 42 | "aarch64-unknown-uefi", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 43 | ], |
| 44 | ) |
| Tim Windelschmidt | 74a2331 | 2025-02-10 23:12:24 +0100 | [diff] [blame] | 45 | use_repo( |
| 46 | crate, |
| 47 | "crate_index", |
| 48 | "crate_index_efi", |
| 49 | ) |