Skip to content

Commit 921a4f1

Browse files
committed
Patch aspect_rules_esbuild to add win32-arm64 platform support
aspect_rules_esbuild 0.25.1 doesn't include Windows ARM64 in its platform list despite esbuild shipping native win32-arm64 binaries. This caused 911 targets to fail toolchain resolution on ARM64 Windows. Add a patch that: - Adds win32-arm64 to _PLATFORMS in toolchains_repo.bzl - Adds the npm integrity hash for @esbuild/win32-arm64@0.19.9 to versions.bzl Made-with: Cursor
1 parent 4ff98f0 commit 921a4f1

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

MODULE.bazel

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,19 @@ archive_override(
5858
url = "https://github.com/aspect-build/rules_js/releases/download/v3.0.3/rules_js-v3.0.3.tar.gz",
5959
)
6060

61+
# Patch aspect_rules_esbuild to add win32-arm64 platform + integrity hash. The upstream rules
62+
# don't include ARM64 Windows despite esbuild shipping native binaries for it.
63+
archive_override(
64+
module_name = "aspect_rules_esbuild",
65+
integrity = "sha256-tz1ly+0pGMOC93pUihBpgrQPhSAPAlVl1c+hsuCQEec=",
66+
patch_args = ["-p1"],
67+
patches = [
68+
"//:patches/aspect_rules_esbuild/0001-add-win32-arm64-platform.patch",
69+
],
70+
strip_prefix = "rules_esbuild-0.25.1",
71+
url = "https://github.com/aspect-build/rules_esbuild/releases/download/v0.25.1/rules_esbuild-v0.25.1.tar.gz",
72+
)
73+
6174
# Automatically managed dependencies
6275
include("//build/deps:gen/deps.MODULE.bazel")
6376
include("//build/deps:gen/build_deps.MODULE.bazel")
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
diff --git a/esbuild/private/toolchains_repo.bzl b/esbuild/private/toolchains_repo.bzl
2+
index 7ac299c..d3c9648 100644
3+
--- a/esbuild/private/toolchains_repo.bzl
4+
+++ b/esbuild/private/toolchains_repo.bzl
5+
@@ -52,6 +52,12 @@ _PLATFORMS = {
6+
"@platforms//cpu:x86_64",
7+
],
8+
),
9+
+ "win32-arm64": struct(
10+
+ compatible_with = [
11+
+ "@platforms//os:windows",
12+
+ "@platforms//cpu:aarch64",
13+
+ ],
14+
+ ),
15+
}
16+
17+
def get_platforms(version):
18+
diff --git a/esbuild/private/versions.bzl b/esbuild/private/versions.bzl
19+
index fa70920..be75f12 100644
20+
--- a/esbuild/private/versions.bzl
21+
+++ b/esbuild/private/versions.bzl
22+
@@ -100,6 +100,7 @@ TOOL_VERSIONS = {
23+
"linux-x64": "sha512-JUjpystGFFmNrEHQnIVG8hKwvA2DN5o7RqiO1CVX8EN/F/gkCjkUMgVn6hzScpwnJtl2mPR6I9XV1oW8k9O+0A==",
24+
"linux-arm64": "sha512-PiPblfe1BjK7WDAKR1Cr9O7VVPqVNpwFcPWgfn4xu0eMemzRp442hXyzF/fSwgrufI66FpHOEJk0yYdPInsmyQ==",
25+
"win32-x64": "sha512-oxoQgglOP7RH6iasDrhY+R/3cHrfwIDvRlT4CGChflq6twk8iENeVvMJjmvBb94Ik1Z+93iGO27err7w6l54GQ==",
26+
+ "win32-arm64": "sha512-GQoa6OrQ8G08guMFgeXPH7yE/8Dt0IfOGWJSfSH4uafwdC7rWwrfE6P9N8AtPGIjUzdo2+7bN8Xo3qC578olhg==",
27+
},
28+
"0.19.8": {
29+
"npm": "sha512-l7iffQpT2OrZfH2rXIp7/FkmaeZM0vxbxN9KfiCwGYuZqzMg/JdvX26R31Zxn/Pxvsrg3Y9N6XTcnknqDyyv4w==",

0 commit comments

Comments
 (0)