feat: Add Windows ARM64 (win32-arm64) toolchain support#287
Open
petero-dk wants to merge 1 commit into
Open
Conversation
- Add win32-arm64 platform to _PLATFORMS in toolchains_repo.bzl - Add win32-arm64/windows-arm64 integrity hashes to TOOL_VERSIONS for all esbuild versions that publish a Windows ARM64 binary (0.13.12+) - Update mirror_release.sh to fetch win32-arm64 hashes for future releases Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rules_esbuild only declared toolchains for darwin-x64, darwin-arm64, linux-x64, linux-arm64, and win32-x64. There was no toolchain for Windows on ARM64, even though esbuild publishes a
@esbuild/win32-arm64npm package (and the legacy unscopedesbuild-windows-arm64package for esbuild < 0.16.0).The
win32-arm64platform entry is compatible with@platforms//os:windows+@platforms//cpu:aarch64. The existing legacy-name transform (win32->windows) already produces the correct old-style keywindows-arm64for esbuild < 0.16.0, so no code change was needed there. Integrity hashes were fetched directly from the npm registry to match the existing format, and added to every version inTOOL_VERSIONSfor which esbuild actually publishes a Windows ARM64 binary. Version0.11.20predates the Windows ARM64 package's existence, so it intentionally has nowindows-arm64entry; repository rules are lazy, so this only produces an error if someone explicitly requests that exact platform/version combination, consistent with the existing_fail__no_integritybehavior for any other missing hash. No changes were needed intoolchain.bzl,repositories.bzl, or the rest oftoolchains_repo.bzl, since they already derive behavior generically from_PLATFORMS/TOOL_VERSIONS.Changes are visible to end-users: yes
Adds support for the Windows ARM64 (
win32-arm64) esbuild toolchain, soesbuild_register_toolchains/ theesbuildmodule extension now resolve a native binary on Windows ARM64 hosts.Test plan
Ran
bazel build //esbuild/...to confirmversions.bzlandtoolchains_repo.bzlstill load and analyze correctly, and verified via a Pythonexecofversions.bzlthatget_platforms()resolveswin32-arm64(orwindows-arm64for legacy versions) for every entry inTOOL_VERSIONSexcept0.11.20, which predates the Windows ARM64 npm package.