| Lorenz Brun | 54a5a05 | 2023-10-02 16:40:11 +0200 | [diff] [blame] | 1 | load("@rules_rust//rust:defs.bzl", "rust_binary") |
| Jan Schär | 778cc33 | 2025-04-29 16:31:40 +0000 | [diff] [blame] | 2 | load("//osbase/build:def.bzl", "ignore_unused_configuration_target") |
| Lorenz Brun | 54a5a05 | 2023-10-02 16:40:11 +0200 | [diff] [blame] | 3 | |
| 4 | rust_binary( |
| Jan Schär | 778cc33 | 2025-04-29 16:31:40 +0000 | [diff] [blame] | 5 | name = "abloader_bin", |
| Lorenz Brun | 54a5a05 | 2023-10-02 16:40:11 +0200 | [diff] [blame] | 6 | srcs = ["main.rs"], |
| 7 | edition = "2021", |
| Jan Schär | 51c6748 | 2025-05-05 13:11:55 +0000 | [diff] [blame^] | 8 | platform = select({ |
| 9 | "@platforms//cpu:x86_64": "//build/platforms:uefi_x86_64", |
| 10 | "@platforms//cpu:aarch64": "//build/platforms:uefi_aarch64", |
| 11 | }), |
| Jan Schär | e269ebf | 2025-04-23 09:52:49 +0000 | [diff] [blame] | 12 | # rust_binary depends on the status files by default, even if no stamp |
| 13 | # variables are used, which causes unnecessary rebuilds when the stable |
| 14 | # status file changes. |
| 15 | stamp = 0, |
| Lorenz Brun | 54a5a05 | 2023-10-02 16:40:11 +0200 | [diff] [blame] | 16 | target_compatible_with = [ |
| 17 | "@platforms//os:uefi", |
| 18 | ], |
| Jan Schär | 778cc33 | 2025-04-29 16:31:40 +0000 | [diff] [blame] | 19 | visibility = ["//visibility:private"], |
| Lorenz Brun | 54a5a05 | 2023-10-02 16:40:11 +0200 | [diff] [blame] | 20 | deps = [ |
| 21 | "//metropolis/node/core/abloader/spec:abloader_proto_rs", |
| Tim Windelschmidt | 223609c | 2024-01-12 22:59:20 +0100 | [diff] [blame] | 22 | "@crate_index_efi//:prost", |
| 23 | "@crate_index_efi//:uefi", |
| 24 | "@crate_index_efi//:uefi-services", |
| Lorenz Brun | 54a5a05 | 2023-10-02 16:40:11 +0200 | [diff] [blame] | 25 | ], |
| 26 | ) |
| Jan Schär | 778cc33 | 2025-04-29 16:31:40 +0000 | [diff] [blame] | 27 | |
| 28 | ignore_unused_configuration_target( |
| 29 | name = "abloader", |
| 30 | dep = ":abloader_bin", |
| 31 | visibility = ["//visibility:public"], |
| 32 | ) |