From 144cbed47f78d9f0b870fc84b06f20d427178b78 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Fri, 23 Sep 2022 15:43:12 -0700 Subject: [PATCH] fix: canonicalize @platforms//cpu:aarch64 This is defined as an alias to :arm64: https://github.com/bazelbuild/platforms/blob/212a486d66569b29c95b00364e2584e80fd08614/cpu/BUILD#L16-L20 but toolchain resolution doesn't understand the two to be equivalent. Fixes https://github.com/aspect-build/rules_js/issues/469 --- nodejs/private/toolchains_repo.bzl | 4 ++-- packages/concatjs/devserver/BUILD.bazel | 2 +- toolchains/esbuild/esbuild_packages.bzl | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nodejs/private/toolchains_repo.bzl b/nodejs/private/toolchains_repo.bzl index 0fc40ef965..5c874f48a9 100644 --- a/nodejs/private/toolchains_repo.bzl +++ b/nodejs/private/toolchains_repo.bzl @@ -27,7 +27,7 @@ PLATFORMS = { "linux_arm64": struct( compatible_with = [ "@platforms//os:linux", - "@platforms//cpu:aarch64", + "@platforms//cpu:arm64", ], ), "linux_s390x": struct( @@ -51,7 +51,7 @@ PLATFORMS = { "darwin_arm64": struct( compatible_with = [ "@platforms//os:macos", - "@platforms//cpu:aarch64", + "@platforms//cpu:arm64", ], ), "windows_amd64": struct( diff --git a/packages/concatjs/devserver/BUILD.bazel b/packages/concatjs/devserver/BUILD.bazel index 90f825ce92..fe7d70d651 100644 --- a/packages/concatjs/devserver/BUILD.bazel +++ b/packages/concatjs/devserver/BUILD.bazel @@ -103,7 +103,7 @@ config_setting( name = "linux_arm64", constraint_values = [ "@platforms//os:linux", - "@platforms//cpu:aarch64", + "@platforms//cpu:arm64", ], ) diff --git a/toolchains/esbuild/esbuild_packages.bzl b/toolchains/esbuild/esbuild_packages.bzl index a6c1b0d143..9cf838498e 100644 --- a/toolchains/esbuild/esbuild_packages.bzl +++ b/toolchains/esbuild/esbuild_packages.bzl @@ -30,7 +30,7 @@ ESBUILD_PACKAGES = struct( binary_path = "bin/esbuild", exec_compatible_with = [ "@platforms//os:macos", - "@platforms//cpu:aarch64", + "@platforms//cpu:arm64", ], ), "linux_amd64": struct( @@ -52,7 +52,7 @@ ESBUILD_PACKAGES = struct( binary_path = "bin/esbuild", exec_compatible_with = [ "@platforms//os:linux", - "@platforms//cpu:aarch64", + "@platforms//cpu:arm64", ], ), "windows_amd64": struct(