From d096f5cd946a1ad9f73c1e32936f7c94f068470c Mon Sep 17 00:00:00 2001 From: Prasanna Swaminathan Date: Sun, 23 Feb 2025 14:54:48 -0500 Subject: [PATCH] Add alias for `amd64` to `x86_64` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `amd64` gets returned by `repository_ctx.os.arch`, and yet the CPU constraint only has `x86_64`. This becomes un-ergonomic when trying to set up repository and toolchain rules—I constantly have to ask myself which is which/try it out. `arm64` has an alias to `aarch64`, so there is precedent for including an equivalent name when the implementation-canonical name may not be as friendly or widely known. --- cpu/BUILD | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpu/BUILD b/cpu/BUILD index 6497452..0ecd6b6 100644 --- a/cpu/BUILD +++ b/cpu/BUILD @@ -59,6 +59,11 @@ constraint_value( constraint_setting = ":cpu", ) +alias( + name = "amd64", + actual = ":x86_64", +) + alias( name = "arm", actual = ":aarch32",