From 4bd16d41341c44f4ca66739a398daefc321175ab Mon Sep 17 00:00:00 2001 From: Sunil Pai Date: Thu, 2 Apr 2026 20:03:27 +0100 Subject: [PATCH 1/9] Add Windows ARM64 build and release support Add end-to-end support for building, testing, and releasing workerd on Windows ARM64 (aarch64-pc-windows-msvc). This enables `npm install workerd` to work natively on Windows ARM64 devices (e.g. Snapdragon laptops) via the new @cloudflare/workerd-windows-arm64 package. Bazel build system: - Define arm64_windows-clang-cl platform in BUILD.bazel - Add build:windows_arm64 config overriding the toolchain and execution platform from x64 to ARM64 - Add build:release_windows_arm64 composing release_windows + windows_arm64 - Add build:ci-windows-arm64 for CI release builds Rust toolchain: - Register aarch64-pc-windows-msvc in RUST_TARGET_TRIPLES so rules_rust downloads and configures a Rust toolchain for the new target - Add the triple to supported_platform_triples in crates_vendor so the Cargo dependency graph resolves for Windows ARM64 - Add win_arm64 config_setting_group and wire cargo-bazel to use the x64 binary under WoW64 emulation (no native ARM64 build available) Host tools: - Add @bazel_tools//src/conditions:windows_arm64 entries to wasm-tools and clang-tidy selects, falling back to x64 binaries under emulation NPM distribution: - Create npm/workerd-windows-arm64/ package (os: win32, cpu: arm64) - Add "win32 arm64 LE" to knownPackages in node-platform.ts - Add @cloudflare/workerd-windows-arm64 to optionalDependencies in the workerd meta-package and build-shim-package.mjs CI/CD: - Add windows-arm64 build matrix entry in release.yml using the windows-11-arm GitHub Actions runner - Add windows-arm64 upload-artifacts entry for release asset publishing and npm per-arch package publishing - Add windows-arm64 to test.yml matrix (debug builds excluded, matching the x64 Windows exclusion for disk space reasons) Note: the @local_config_cc toolchain name for ARM64 Windows is auto-generated by Bazel based on what it discovers on the host. If the first CI run fails with a toolchain resolution error, query @local_config_cc//:all on the runner to find the correct label. Made-with: Cursor --- .bazelrc | 9 +++++++++ .github/workflows/release.yml | 18 ++++++++++++------ .github/workflows/test.yml | 3 +++ BUILD.bazel | 9 +++++++++ RELEASE.md | 2 +- build/ci.bazelrc | 3 +++ build/deps/rust.MODULE.bazel | 3 +++ deps/rust/BUILD.bazel | 11 +++++++++++ npm/lib/node-platform.ts | 1 + npm/scripts/build-shim-package.mjs | 1 + npm/workerd-windows-arm64/package.json | 17 +++++++++++++++++ npm/workerd/package.json | 1 + tools/BUILD.bazel | 4 ++++ 13 files changed, 75 insertions(+), 7 deletions(-) create mode 100644 npm/workerd-windows-arm64/package.json diff --git a/.bazelrc b/.bazelrc index 80fb5f7ce01..c6daeefd1bc 100644 --- a/.bazelrc +++ b/.bazelrc @@ -346,6 +346,12 @@ build:windows --enable_runfiles build:windows --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl build:windows --extra_execution_platforms=//:x64_windows-clang-cl +# Windows ARM64 overrides: use the ARM64 platform instead of x64. The toolchain name is +# auto-generated by local_config_cc – if this doesn't match what Bazel detects on the ARM64 +# runner, query @local_config_cc//:all to find the correct name. +build:windows_arm64 --extra_toolchains=@local_config_cc//:cc-toolchain-arm64_windows-clang-cl +build:windows_arm64 --extra_execution_platforms=//:arm64_windows-clang-cl + # The Windows fastbuild bazel configuration is broken in that it necessarily generates PDB debug # information while the Linux and macOS toolchains only compile with debug information in the dbg # configuration or when requested with the -g flag. This causes huge increases in compile time and @@ -435,6 +441,9 @@ build:release_windows --per_file_copt="src/workerd/server/container-client"@/cla # Work around Windows test failures in rpc-related tests build:release_windows --per_file_copt=src/workerd/io/worker-interface@/clang:-fno-inline +build:release_windows_arm64 --config=release_windows +build:release_windows_arm64 --config=windows_arm64 + build:windows --cxxopt='/std:c++23preview' --host_cxxopt='/std:c++23preview' build:windows --copt='/D_CRT_USE_BUILTIN_OFFSETOF' --host_copt='/D_CRT_USE_BUILTIN_OFFSETOF' build:windows --copt='/DWIN32_LEAN_AND_MEAN' --host_copt='/DWIN32_LEAN_AND_MEAN' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b932573ac6..01af1aff805 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,6 +104,11 @@ jobs: image: windows-2025-16core bazel-config: release_windows target-arch: X64 + - title: windows-arm64 + os-name: Windows + image: windows-11-arm + bazel-config: release_windows_arm64 + target-arch: ARM64 name: build (${{ matrix.title }}) uses: './.github/workflows/_bazel.yml' with: @@ -130,8 +135,6 @@ jobs: strategy: matrix: arch: [linux-64, darwin-64, windows-64] - # This variable itself is unused, but allows us to set up two macOS builds. arm64 builds for - # other platforms will be supported later, then we'll list both architectures here. cpu: [X64] include: - arch: linux-64 @@ -146,6 +149,9 @@ jobs: cpu: ARM64 - arch: windows-64 name: Windows-X64 + - arch: windows-arm64 + name: Windows-ARM64 + cpu: ARM64 steps: - name: Checkout Repo uses: actions/checkout@v6 @@ -158,15 +164,15 @@ jobs: name: ${{ matrix.name }}-binary path: /tmp # Set execute permissions before compressing the binary - - if: matrix.arch != 'windows-64' + - if: ${{ !contains(matrix.arch, 'windows') }} run: chmod +x /tmp/workerd - name: Compress release binary run: | # As of release v1.20230404.0 the Linux x64 binary after debug_strip is 65.8 MB, # 21.0 MB with gzip and 17.3 MB with brotli -9. Use gzip as a widely supported format # which still produces an acceptable compressed size. - gzip -9N -k /tmp/workerd${{ matrix.arch == 'windows-64' && '.exe' || '' }} - - run: mv /tmp/workerd${{ matrix.arch == 'windows-64' && '.exe' || '' }}.gz /tmp/workerd-${{ matrix.arch }}.gz + gzip -9N -k /tmp/workerd${{ contains(matrix.arch, 'windows') && '.exe' || '' }} + - run: mv /tmp/workerd${{ contains(matrix.arch, 'windows') && '.exe' || '' }}.gz /tmp/workerd-${{ matrix.arch }}.gz # Upload compressed release binaries – one set of artifacts is sufficient with gzip being # widely supported - name: Upload Release Assets @@ -191,7 +197,7 @@ jobs: WORKERD_VERSION: ${{ needs.version.outputs.version }} LATEST_COMPATIBILITY_DATE: ${{ needs.version.outputs.date }} - run: mkdir npm/workerd-${{ matrix.arch }}/bin - - run: cp /tmp/workerd${{ matrix.arch == 'windows-64' && '.exe' || '' }} npm/workerd-${{ matrix.arch }}/bin/workerd${{ matrix.arch == 'windows-64' && '.exe' || '' }} + - run: cp /tmp/workerd${{ contains(matrix.arch, 'windows') && '.exe' || '' }} npm/workerd-${{ matrix.arch }}/bin/workerd${{ contains(matrix.arch, 'windows') && '.exe' || '' }} - run: echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > npm/workerd-${{ matrix.arch }}/.npmrc - run: cd npm/workerd-${{ matrix.arch }} && npm publish --access public --tag ${{ startsWith(needs.version.outputs.version, '0') && 'beta' || 'latest'}} env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9f003357ec4..2afc3278c15 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,6 +37,7 @@ jobs: { name: linux-arm, arch: ARM64, image: ubuntu-22.04-arm-16core }, { name: macOS, arch: ARM64, image: macos-15-xlarge, use_lld: true }, { name: windows, arch: X64, image: windows-2025-16core }, + { name: windows-arm64, arch: ARM64, image: windows-11-arm }, ] config: [ # Default build: no suffix or additional bazel arguments @@ -57,6 +58,8 @@ jobs: exclude: - os: { name: windows, arch: X64, image: windows-2025-16core } config: { suffix: -debug } + - os: { name: windows-arm64, arch: ARM64, image: windows-11-arm } + config: { suffix: -debug } # due to resource constraints, exclude the macOS and x64 Linux debug runners for now. # linux-asan and arm64 linux-debug should provide sufficient coverage for building in the # debug configuration. diff --git a/BUILD.bazel b/BUILD.bazel index f9f8c1a3714..98e91c5a7a6 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -62,6 +62,15 @@ platform( ], ) +platform( + name = "arm64_windows-clang-cl", + constraint_values = [ + "@platforms//cpu:aarch64", + "@platforms//os:windows", + "@bazel_tools//tools/cpp:clang-cl", + ], +) + # Used for cross-compilation platform( name = "macOS_x86", diff --git a/RELEASE.md b/RELEASE.md index 0c8a435a580..b1b5f92a15a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -8,4 +8,4 @@ The primary distribution channel for `workerd` right now is through `npm`. We us ## Cutting Releases -This is pretty simple, and completely automatic—every time the date in [release-version.txt](src/workerd/io/release-version.txt) changes, a new release is generated, along with the built binaries for `linux-64`, `linux-arm64`, `darwin-64`, `darwin-arm64` and `windows-64`. The types will also be generated and published automatically. This is governed by the [release.yml](.github/workflows/release.yml) GitHub Action. +This is pretty simple, and completely automatic—every time the date in [release-version.txt](src/workerd/io/release-version.txt) changes, a new release is generated, along with the built binaries for `linux-64`, `linux-arm64`, `darwin-64`, `darwin-arm64`, `windows-64` and `windows-arm64`. The types will also be generated and published automatically. This is governed by the [release.yml](.github/workflows/release.yml) GitHub Action. diff --git a/build/ci.bazelrc b/build/ci.bazelrc index 995053de13e..3410d74c51b 100644 --- a/build/ci.bazelrc +++ b/build/ci.bazelrc @@ -88,12 +88,15 @@ test:ci-macOS --spawn_strategy=local build:ci-windows --config=release_windows build:ci-windows-debug --config=debug +build:ci-windows-arm64 --config=release_windows_arm64 + # Some tests (like Python import tests) take a long time to run, especially when debug is enabled # For that reason, we only run them in the default configuration for each platform to minimize # effect on CI pipeline runtime. test:ci-linux --test_size_filters= test:ci-macOS --test_size_filters= test:ci-windows --test_size_filters= +test:ci-windows-arm64 --test_size_filters= # Run container tests on Linux CI test:ci-linux --test_tag_filters=-off-by-default,-requires-fuzzilli diff --git a/build/deps/rust.MODULE.bazel b/build/deps/rust.MODULE.bazel index 4e4506dade2..e9f97d0a905 100644 --- a/build/deps/rust.MODULE.bazel +++ b/build/deps/rust.MODULE.bazel @@ -8,6 +8,8 @@ RUST_TARGET_TRIPLES = [ "x86_64-apple-darwin", # Add support for macOS rosetta "aarch64-unknown-linux-gnu", + # Add support for Windows ARM64 + "aarch64-pc-windows-msvc", ] # rules_rust @@ -36,6 +38,7 @@ rust.toolchain( "x86_64-pc-windows-msvc": ["-Ctarget-feature=+sse4.2"], "aarch64-unknown-linux-gnu": ["-Ctarget-feature=+crc"], # No options needed for aarch64-apple-darwin: CRC feature is enabled by default. + # No options needed for aarch64-pc-windows-msvc: CRC feature is enabled by default on ARM64. }, extra_target_triples = RUST_TARGET_TRIPLES, rustfmt_version = RUST_NIGHTLY_VERSION, diff --git a/deps/rust/BUILD.bazel b/deps/rust/BUILD.bazel index 419608a3838..bbc0acc4719 100644 --- a/deps/rust/BUILD.bazel +++ b/deps/rust/BUILD.bazel @@ -45,12 +45,22 @@ selects.config_setting_group( ], ) +selects.config_setting_group( + name = "win_arm64", + match_all = [ + "@platforms//os:windows", + "@platforms//cpu:aarch64", + ], +) + CARGO_BAZEL = select({ ":linux_x64": "@cargo_bazel_linux_x64//file:downloaded", ":linux_arm64": "@cargo_bazel_linux_arm64//file:downloaded", ":macos_x64": "@cargo_bazel_macos_x64//file:downloaded", ":macos_arm64": "@cargo_bazel_macos_arm64//file:downloaded", ":win_x64": "@cargo_bazel_win_x64//file:downloaded.exe", + # x64 cargo-bazel runs under emulation on Windows ARM64 + ":win_arm64": "@cargo_bazel_win_x64//file:downloaded.exe", }) # Generates a repository containing all the crates we reference from our @@ -82,6 +92,7 @@ crates_vendor( "aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc", + "aarch64-pc-windows-msvc", ], ) diff --git a/npm/lib/node-platform.ts b/npm/lib/node-platform.ts index ae9264b4bd1..348c6e97167 100644 --- a/npm/lib/node-platform.ts +++ b/npm/lib/node-platform.ts @@ -17,6 +17,7 @@ export const knownPackages: Record = { "darwin x64 LE": "@cloudflare/workerd-darwin-64", "linux arm64 LE": "@cloudflare/workerd-linux-arm64", "linux x64 LE": "@cloudflare/workerd-linux-64", + "win32 arm64 LE": "@cloudflare/workerd-windows-arm64", "win32 x64 LE": "@cloudflare/workerd-windows-64", }; diff --git a/npm/scripts/build-shim-package.mjs b/npm/scripts/build-shim-package.mjs index 94eba0a93fc..c801e7025f5 100644 --- a/npm/scripts/build-shim-package.mjs +++ b/npm/scripts/build-shim-package.mjs @@ -17,6 +17,7 @@ function buildNeutralLib() { '@cloudflare/workerd-darwin-64': process.env.WORKERD_VERSION, '@cloudflare/workerd-linux-arm64': process.env.WORKERD_VERSION, '@cloudflare/workerd-linux-64': process.env.WORKERD_VERSION, + '@cloudflare/workerd-windows-arm64': process.env.WORKERD_VERSION, '@cloudflare/workerd-windows-64': process.env.WORKERD_VERSION, }; fs.writeFileSync(pjPath, JSON.stringify(package_json, null, 2) + '\n'); diff --git a/npm/workerd-windows-arm64/package.json b/npm/workerd-windows-arm64/package.json new file mode 100644 index 00000000000..e0c5a3f9743 --- /dev/null +++ b/npm/workerd-windows-arm64/package.json @@ -0,0 +1,17 @@ +{ + "name": "@cloudflare/workerd-windows-arm64", + "description": "👷 workerd for Windows ARM64, Cloudflare's JavaScript/Wasm Runtime", + "repository": "https://github.com/cloudflare/workerd", + "license": "Apache-2.0", + "preferUnplugged": false, + "engines": { + "node": ">=16" + }, + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ], + "version": "1.20220926.0" +} diff --git a/npm/workerd/package.json b/npm/workerd/package.json index de01663616a..86c57aa085b 100644 --- a/npm/workerd/package.json +++ b/npm/workerd/package.json @@ -18,6 +18,7 @@ "@cloudflare/workerd-darwin-64": "1.20220926.0", "@cloudflare/workerd-linux-arm64": "1.20220926.0", "@cloudflare/workerd-linux-64": "1.20220926.0", + "@cloudflare/workerd-windows-arm64": "1.20220926.0", "@cloudflare/workerd-windows-64": "1.20220926.0" }, "license": "Apache-2.0" diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel index 6dd0c7ade0f..e037ca3d839 100644 --- a/tools/BUILD.bazel +++ b/tools/BUILD.bazel @@ -51,6 +51,8 @@ native_binary( "@bazel_tools//src/conditions:darwin_arm64": "@wasm_tools_macos_arm64//:wasm-tools", "@bazel_tools//src/conditions:darwin_x86_64": "@wasm_tools_macos_x64//:wasm-tools", "@bazel_tools//src/conditions:windows_x64": "@wasm_tools_windows_x64//:wasm-tools.exe", + # x64 binary runs under emulation on Windows ARM64 + "@bazel_tools//src/conditions:windows_arm64": "@wasm_tools_windows_x64//:wasm-tools.exe", }, ), out = "wasm-tools", @@ -65,6 +67,8 @@ native_binary( "@bazel_tools//src/conditions:linux_aarch64": "@clang_tidy_linux_arm64//file:downloaded", "@bazel_tools//src/conditions:darwin_arm64": "@clang_tidy_darwin_arm64//file:downloaded", "@bazel_tools//src/conditions:windows_x64": "@clang_tidy_windows_amd64//file:downloaded", + # x64 binary runs under emulation on Windows ARM64 + "@bazel_tools//src/conditions:windows_arm64": "@clang_tidy_windows_amd64//file:downloaded", }, ), out = "clang_tidy", From 7ee34b6261044b7ce0ccec2aa6654f22e9dd7750 Mon Sep 17 00:00:00 2001 From: Sunil Pai Date: Thu, 2 Apr 2026 20:37:09 +0100 Subject: [PATCH 2/9] Bump yq.bzl to 0.3.5 for Windows ARM64 yq toolchain support aspect_rules_js uses yq to parse pnpm lockfiles during repository setup. It resolves the yq binary via @yq_{platform}, where {platform} is detected from the host. On Windows ARM64, this becomes @yq_windows_arm64, which doesn't exist in yq.bzl 0.3.2 (the version transitively pulled in by aspect_rules_js 3.0.3). yq.bzl 0.3.5 includes Windows ARM64 yq binaries, so we override the transitive version with a direct bazel_dep in the root MODULE.bazel. This was the primary blocker identified in the prior Windows ARM64 attempt (PR #4062). The other blockers from that attempt have since been resolved: - rules_nodejs 6.7.3 (already used) includes windows_arm64 Node.js toolchain support (merged in 6.5.0, fix in 6.6.1) - bazel_lib 3.2.2 (already used) includes windows_arm64 binaries for copy_to_directory, coreutils, expand_template, and zstd - The setup-runner action already enables developer mode on Windows via reg add, which also runs on ARM64 runners Made-with: Cursor --- MODULE.bazel | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MODULE.bazel b/MODULE.bazel index 5519dd686a9..174ecaa77f0 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -35,6 +35,16 @@ archive_override( bazel_dep(name = "rules_go", version = "0.60.0", repo_name = None) bazel_dep(name = "rules_android", version = "0.7.1", repo_name = None) +# Override yq.bzl to 0.3.5 for Windows ARM64 yq toolchain support. The transitive version (0.3.2) +# pulled in by aspect_rules_js lacks windows_arm64 in its platform list. +bazel_dep(name = "yq.bzl", version = "0.3.5") +archive_override( + module_name = "yq.bzl", + integrity = "sha256-zma0n7LjdqDY0rxYe8GqIju96A6GwKghRXCYp56lgDg=", + strip_prefix = "yq.bzl-0.3.5", + url = "https://github.com/bazel-contrib/yq.bzl/releases/download/v0.3.5/yq.bzl-v0.3.5.tar.gz", +) + # Automatically managed dependencies include("//build/deps:gen/deps.MODULE.bazel") include("//build/deps:gen/build_deps.MODULE.bazel") From 75c5eb9086d3eeee61aa27b3cd3c9e7223c36660 Mon Sep 17 00:00:00 2001 From: Sunil Pai Date: Thu, 2 Apr 2026 20:49:53 +0100 Subject: [PATCH 3/9] Fix workspace-status.cmd bash path detection for ARM64 Windows The script derives Git's bash.exe location by stripping known git.exe suffixes from the path returned by `where git.exe`. It handled \cmd\git.exe and \mingw64\bin\git.exe but not \bin\git.exe, which is the path returned on ARM64 Windows runners. Also fix the `for` loop to use `goto` instead of `break` (which doesn't exit batch for-loops) so only the first result from `where` is used. Made-with: Cursor --- tools/windows/workspace-status.cmd | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/windows/workspace-status.cmd b/tools/windows/workspace-status.cmd index be63831ffad..80c1a57cbe7 100644 --- a/tools/windows/workspace-status.cmd +++ b/tools/windows/workspace-status.cmd @@ -4,14 +4,16 @@ @rem find git.exe for /F "tokens=* USEBACKQ" %%F in (`where git.exe`) do ( set "GIT=%%F" - break + goto :found_git ) +:found_git @rem Git's bash is located at %GITINSTALLDIR%\bin\bash.exe -@rem Git's git.exe is typically located at %GITINSTALLDIR%\cmd\git.exe or -@rem %GITINSTALLDIR%\mingw64\bin\git.exe. +@rem Git's git.exe is typically located at %GITINSTALLDIR%\cmd\git.exe, +@rem %GITINSTALLDIR%\mingw64\bin\git.exe, or %GITINSTALLDIR%\bin\git.exe. set "_GITEXEDIR=%GIT:\cmd\git.exe=%" -set "GITEXEDIR=%_GITEXEDIR:\mingw64\bin\git.exe=%" +set "_GITEXEDIR=%_GITEXEDIR:\mingw64\bin\git.exe=%" +set "GITEXEDIR=%_GITEXEDIR:\bin\git.exe=%" set "BASH=%GITEXEDIR%\bin\bash.exe" @rem Change to the directory of this script (tools/windows) to From a5dc58073616074c98cad8c51b738c3a43f7332a Mon Sep 17 00:00:00 2001 From: Sunil Pai Date: Tue, 7 Apr 2026 01:43:35 +0100 Subject: [PATCH 4/9] Use Bazel 9.0.2rc1 on ARM64 Windows instead of x64 workaround Bazel 9.0.2rc1 is now available with the fix for the ARM64 Windows JNI DLL mismatch (bazelbuild/bazel#28941, PR #29012). This allows native ARM64 Bazel to run correctly, which means the toolchain auto-detection will find the ARM64 clang-cl toolchain instead of x64 MSVC. Replace the BAZELISK_FORMAT_URL workaround (which forced x64 Bazel and caused toolchain misdetection) with USE_BAZEL_VERSION=9.0.2rc1 scoped to ARM64 Windows only. Other platforms continue using 9.0.1 from .bazelversion. Made-with: Cursor --- .github/actions/setup-runner/action.yml | 8 ++++++++ MODULE.bazel | 13 +++++++++++++ .../0001-add-yq-windows-arm64-to-use-repo.patch | 12 ++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 patches/aspect_rules_js/0001-add-yq-windows-arm64-to-use-repo.patch diff --git a/.github/actions/setup-runner/action.yml b/.github/actions/setup-runner/action.yml index 3e93db9dbe9..d5f0cbf1c87 100644 --- a/.github/actions/setup-runner/action.yml +++ b/.github/actions/setup-runner/action.yml @@ -49,6 +49,14 @@ runs: git config --show-scope --show-origin core.symlinks git config --system core.longpaths true [System.IO.File]::WriteAllLines((Join-Path -Path $env:USERPROFILE -ChildPath '.bazelrc'), 'startup --output_user_root=\\\\?\\C:\\tmp') + - name: Use Bazel 9.0.2rc1 on ARM64 Windows + shell: pwsh + if: runner.os == 'Windows' && runner.arch == 'ARM64' + # Bazel 9.0.1 has a broken ARM64 Windows build (bazelbuild/bazel#28941). + # Use 9.0.2rc1 which fixes the JNI DLL architecture mismatch. + # TODO(cleanup): Remove this once .bazelversion is bumped to 9.0.2+. + run: | + echo "USE_BAZEL_VERSION=9.0.2rc1" >> $env:GITHUB_ENV - name: Setup macOS if: runner.os == 'macOS' shell: bash diff --git a/MODULE.bazel b/MODULE.bazel index 174ecaa77f0..435c59bbf6d 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -45,6 +45,19 @@ archive_override( url = "https://github.com/bazel-contrib/yq.bzl/releases/download/v0.3.5/yq.bzl-v0.3.5.tar.gz", ) +# Patch aspect_rules_js to add yq_windows_arm64 to its use_repo list. Without this, the +# @yq_windows_arm64 repo created by yq.bzl is not visible from aspect_rules_js's module scope. +archive_override( + module_name = "aspect_rules_js", + integrity = "sha256-eBgxR7xQutVxi+c7M4Dn9G4hR/PJl6KQ4sXpWZQQUuE=", + patch_args = ["-p1"], + patches = [ + "//:patches/aspect_rules_js/0001-add-yq-windows-arm64-to-use-repo.patch", + ], + strip_prefix = "rules_js-3.0.3", + url = "https://github.com/aspect-build/rules_js/releases/download/v3.0.3/rules_js-v3.0.3.tar.gz", +) + # Automatically managed dependencies include("//build/deps:gen/deps.MODULE.bazel") include("//build/deps:gen/build_deps.MODULE.bazel") diff --git a/patches/aspect_rules_js/0001-add-yq-windows-arm64-to-use-repo.patch b/patches/aspect_rules_js/0001-add-yq-windows-arm64-to-use-repo.patch new file mode 100644 index 00000000000..f8b7e62be78 --- /dev/null +++ b/patches/aspect_rules_js/0001-add-yq-windows-arm64-to-use-repo.patch @@ -0,0 +1,12 @@ +diff --git a/MODULE.bazel b/MODULE.bazel +index 9100e7b..c773576 100644 +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -72,6 +72,7 @@ use_repo( + "yq_linux_ppc64le", + "yq_linux_s390x", + "yq_windows_amd64", ++ "yq_windows_arm64", + ) + + tar_toolchains = use_extension("@tar.bzl//tar:extensions.bzl", "toolchains") From 4ff98f00af39e8559eac7f2915fbf15cf29ee704 Mon Sep 17 00:00:00 2001 From: Sunil Pai Date: Wed, 8 Apr 2026 12:15:43 +0100 Subject: [PATCH 5/9] Add aarch64-pc-windows-msvc to vendored Rust crate platform mappings The vendored crate definitions in deps/rust/crates/defs.bzl were generated without the aarch64-pc-windows-msvc triple, causing Rust crates like windows_sys, mio, socket2, and termcolor to fail to resolve their Windows-specific dependencies on ARM64. Add the triple to the cfg(windows), cfg(any(target_arch = "aarch64")), cfg(not(all(target_arch = "arm"))) conditions and as a literal triple mapping. A proper crates_vendor --repin should be done once the googlesource auth issue is resolved for local development. Made-with: Cursor --- deps/rust/crates/BUILD.ahash-0.8.12.bazel | 3 +++ deps/rust/crates/BUILD.jobserver-0.1.34.bazel | 3 +++ deps/rust/crates/BUILD.mio-1.2.0.bazel | 3 +++ deps/rust/crates/BUILD.sha1-0.10.6.bazel | 3 +++ deps/rust/crates/BUILD.socket2-0.6.3.bazel | 3 +++ deps/rust/crates/BUILD.termcolor-1.4.1.bazel | 3 +++ deps/rust/crates/BUILD.tokio-1.50.0.bazel | 6 ++++++ deps/rust/crates/BUILD.winapi-util-0.1.11.bazel | 3 +++ deps/rust/crates/defs.bzl | 7 ++++--- 9 files changed, 31 insertions(+), 3 deletions(-) diff --git a/deps/rust/crates/BUILD.ahash-0.8.12.bazel b/deps/rust/crates/BUILD.ahash-0.8.12.bazel index 1c1a5bb807a..e5e020bbeee 100644 --- a/deps/rust/crates/BUILD.ahash-0.8.12.bazel +++ b/deps/rust/crates/BUILD.ahash-0.8.12.bazel @@ -56,6 +56,9 @@ rust_library( "@rules_rust//rust/platform:x86_64-apple-darwin": [ "@crates_vendor__once_cell-1.21.4//:once_cell", # cfg(not(all(target_arch = "arm", target_os = "none"))) ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__once_cell-1.21.4//:once_cell", # cfg(not(all(target_arch = "arm", target_os = "none"))) + ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "@crates_vendor__once_cell-1.21.4//:once_cell", # cfg(not(all(target_arch = "arm", target_os = "none"))) ], diff --git a/deps/rust/crates/BUILD.jobserver-0.1.34.bazel b/deps/rust/crates/BUILD.jobserver-0.1.34.bazel index ea21894bb82..961f26e94d0 100644 --- a/deps/rust/crates/BUILD.jobserver-0.1.34.bazel +++ b/deps/rust/crates/BUILD.jobserver-0.1.34.bazel @@ -51,6 +51,9 @@ rust_library( "@rules_rust//rust/platform:x86_64-apple-darwin": [ "@crates_vendor__libc-0.2.183//:libc", # cfg(unix) ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__getrandom-0.3.4//:getrandom", # cfg(windows) + ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "@crates_vendor__getrandom-0.3.4//:getrandom", # cfg(windows) ], diff --git a/deps/rust/crates/BUILD.mio-1.2.0.bazel b/deps/rust/crates/BUILD.mio-1.2.0.bazel index 1c8fdd0ed1a..55759229699 100644 --- a/deps/rust/crates/BUILD.mio-1.2.0.bazel +++ b/deps/rust/crates/BUILD.mio-1.2.0.bazel @@ -56,6 +56,9 @@ rust_library( "@rules_rust//rust/platform:x86_64-apple-darwin": [ "@crates_vendor__libc-0.2.183//:libc", # cfg(any(unix, target_os = "hermit", target_os = "wasi")) ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__windows-sys-0.61.2//:windows_sys", # cfg(windows) + ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "@crates_vendor__windows-sys-0.61.2//:windows_sys", # cfg(windows) ], diff --git a/deps/rust/crates/BUILD.sha1-0.10.6.bazel b/deps/rust/crates/BUILD.sha1-0.10.6.bazel index 68fbd011c88..855177dd72a 100644 --- a/deps/rust/crates/BUILD.sha1-0.10.6.bazel +++ b/deps/rust/crates/BUILD.sha1-0.10.6.bazel @@ -58,6 +58,9 @@ rust_library( "@rules_rust//rust/platform:x86_64-apple-darwin": [ "@crates_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64")) ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64")) + ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "@crates_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64")) ], diff --git a/deps/rust/crates/BUILD.socket2-0.6.3.bazel b/deps/rust/crates/BUILD.socket2-0.6.3.bazel index 6ec06936883..8d8420d28b9 100644 --- a/deps/rust/crates/BUILD.socket2-0.6.3.bazel +++ b/deps/rust/crates/BUILD.socket2-0.6.3.bazel @@ -54,6 +54,9 @@ rust_library( "@rules_rust//rust/platform:x86_64-apple-darwin": [ "@crates_vendor__libc-0.2.183//:libc", # cfg(any(unix, target_os = "wasi")) ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__windows-sys-0.61.2//:windows_sys", # cfg(windows) + ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "@crates_vendor__windows-sys-0.61.2//:windows_sys", # cfg(windows) ], diff --git a/deps/rust/crates/BUILD.termcolor-1.4.1.bazel b/deps/rust/crates/BUILD.termcolor-1.4.1.bazel index 1ffd857c3a9..58db6521099 100644 --- a/deps/rust/crates/BUILD.termcolor-1.4.1.bazel +++ b/deps/rust/crates/BUILD.termcolor-1.4.1.bazel @@ -42,6 +42,9 @@ rust_library( ], version = "1.4.1", deps = select({ + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__winapi-util-0.1.11//:winapi_util", # cfg(windows) + ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "@crates_vendor__winapi-util-0.1.11//:winapi_util", # cfg(windows) ], diff --git a/deps/rust/crates/BUILD.tokio-1.50.0.bazel b/deps/rust/crates/BUILD.tokio-1.50.0.bazel index 207831d0088..ac098db8cfb 100644 --- a/deps/rust/crates/BUILD.tokio-1.50.0.bazel +++ b/deps/rust/crates/BUILD.tokio-1.50.0.bazel @@ -37,6 +37,9 @@ rust_library( "socket2", "time", ] + select({ + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "windows-sys", # aarch64-pc-windows-msvc + ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "windows-sys", # x86_64-pc-windows-msvc ], @@ -69,6 +72,9 @@ rust_library( "@rules_rust//rust/platform:x86_64-apple-darwin": [ "@crates_vendor__libc-0.2.183//:libc", # x86_64-apple-darwin ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__windows-sys-0.61.2//:windows_sys", # aarch64-pc-windows-msvc + ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "@crates_vendor__windows-sys-0.61.2//:windows_sys", # x86_64-pc-windows-msvc ], diff --git a/deps/rust/crates/BUILD.winapi-util-0.1.11.bazel b/deps/rust/crates/BUILD.winapi-util-0.1.11.bazel index e65f9416061..3c6a2325660 100644 --- a/deps/rust/crates/BUILD.winapi-util-0.1.11.bazel +++ b/deps/rust/crates/BUILD.winapi-util-0.1.11.bazel @@ -42,6 +42,9 @@ rust_library( ], version = "0.1.11", deps = select({ + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__windows-sys-0.61.2//:windows_sys", # cfg(windows) + ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "@crates_vendor__windows-sys-0.61.2//:windows_sys", # cfg(windows) ], diff --git a/deps/rust/crates/defs.bzl b/deps/rust/crates/defs.bzl index 15735bec951..935ce6b6896 100644 --- a/deps/rust/crates/defs.bzl +++ b/deps/rust/crates/defs.bzl @@ -402,14 +402,14 @@ _CONDITIONS = { "cfg(all(target_arch = \"wasm32\", target_os = \"wasi\", target_env = \"p2\"))": [], "cfg(all(target_os = \"uefi\", getrandom_backend = \"efi_rng\"))": [], "cfg(any())": [], - "cfg(any(target_arch = \"aarch64\", target_arch = \"x86\", target_arch = \"x86_64\"))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], + "cfg(any(target_arch = \"aarch64\", target_arch = \"x86\", target_arch = \"x86_64\"))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-pc-windows-msvc", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], "cfg(any(target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"hurd\", target_os = \"illumos\", target_os = \"cygwin\", all(target_os = \"horizon\", target_arch = \"arm\")))": [], "cfg(any(target_os = \"haiku\", target_os = \"redox\", target_os = \"nto\", target_os = \"aix\"))": [], "cfg(any(target_os = \"ios\", target_os = \"visionos\", target_os = \"watchos\", target_os = \"tvos\"))": [], "cfg(any(target_os = \"macos\", target_os = \"openbsd\", target_os = \"vita\", target_os = \"emscripten\"))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:x86_64-apple-darwin"], "cfg(any(unix, target_os = \"hermit\", target_os = \"wasi\"))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], "cfg(any(unix, target_os = \"wasi\"))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], - "cfg(not(all(target_arch = \"arm\", target_os = \"none\")))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], + "cfg(not(all(target_arch = \"arm\", target_os = \"none\")))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-pc-windows-msvc", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], "cfg(not(windows))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], "cfg(target_os = \"hermit\")": [], "cfg(target_os = \"netbsd\")": [], @@ -417,8 +417,9 @@ _CONDITIONS = { "cfg(target_os = \"vxworks\")": [], "cfg(target_os = \"wasi\")": [], "cfg(unix)": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], - "cfg(windows)": ["@rules_rust//rust/platform:x86_64-pc-windows-msvc"], + "cfg(windows)": ["@rules_rust//rust/platform:aarch64-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-pc-windows-msvc"], "x86_64-apple-darwin": ["@rules_rust//rust/platform:x86_64-apple-darwin"], + "aarch64-pc-windows-msvc": ["@rules_rust//rust/platform:aarch64-pc-windows-msvc"], "x86_64-pc-windows-msvc": ["@rules_rust//rust/platform:x86_64-pc-windows-msvc"], "x86_64-unknown-linux-gnu": ["@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], } From 921a4f11e4a68f77c7045dccc1014db2d998a604 Mon Sep 17 00:00:00 2001 From: Sunil Pai Date: Wed, 8 Apr 2026 15:05:58 +0100 Subject: [PATCH 6/9] 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 --- MODULE.bazel | 13 +++++++++ .../0001-add-win32-arm64-platform.patch | 29 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 patches/aspect_rules_esbuild/0001-add-win32-arm64-platform.patch diff --git a/MODULE.bazel b/MODULE.bazel index 435c59bbf6d..68a7ae786f3 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -58,6 +58,19 @@ archive_override( url = "https://github.com/aspect-build/rules_js/releases/download/v3.0.3/rules_js-v3.0.3.tar.gz", ) +# Patch aspect_rules_esbuild to add win32-arm64 platform + integrity hash. The upstream rules +# don't include ARM64 Windows despite esbuild shipping native binaries for it. +archive_override( + module_name = "aspect_rules_esbuild", + integrity = "sha256-tz1ly+0pGMOC93pUihBpgrQPhSAPAlVl1c+hsuCQEec=", + patch_args = ["-p1"], + patches = [ + "//:patches/aspect_rules_esbuild/0001-add-win32-arm64-platform.patch", + ], + strip_prefix = "rules_esbuild-0.25.1", + url = "https://github.com/aspect-build/rules_esbuild/releases/download/v0.25.1/rules_esbuild-v0.25.1.tar.gz", +) + # Automatically managed dependencies include("//build/deps:gen/deps.MODULE.bazel") include("//build/deps:gen/build_deps.MODULE.bazel") diff --git a/patches/aspect_rules_esbuild/0001-add-win32-arm64-platform.patch b/patches/aspect_rules_esbuild/0001-add-win32-arm64-platform.patch new file mode 100644 index 00000000000..e3eec67ece8 --- /dev/null +++ b/patches/aspect_rules_esbuild/0001-add-win32-arm64-platform.patch @@ -0,0 +1,29 @@ +diff --git a/esbuild/private/toolchains_repo.bzl b/esbuild/private/toolchains_repo.bzl +index 7ac299c..d3c9648 100644 +--- a/esbuild/private/toolchains_repo.bzl ++++ b/esbuild/private/toolchains_repo.bzl +@@ -52,6 +52,12 @@ _PLATFORMS = { + "@platforms//cpu:x86_64", + ], + ), ++ "win32-arm64": struct( ++ compatible_with = [ ++ "@platforms//os:windows", ++ "@platforms//cpu:aarch64", ++ ], ++ ), + } + + def get_platforms(version): +diff --git a/esbuild/private/versions.bzl b/esbuild/private/versions.bzl +index fa70920..be75f12 100644 +--- a/esbuild/private/versions.bzl ++++ b/esbuild/private/versions.bzl +@@ -100,6 +100,7 @@ TOOL_VERSIONS = { + "linux-x64": "sha512-JUjpystGFFmNrEHQnIVG8hKwvA2DN5o7RqiO1CVX8EN/F/gkCjkUMgVn6hzScpwnJtl2mPR6I9XV1oW8k9O+0A==", + "linux-arm64": "sha512-PiPblfe1BjK7WDAKR1Cr9O7VVPqVNpwFcPWgfn4xu0eMemzRp442hXyzF/fSwgrufI66FpHOEJk0yYdPInsmyQ==", + "win32-x64": "sha512-oxoQgglOP7RH6iasDrhY+R/3cHrfwIDvRlT4CGChflq6twk8iENeVvMJjmvBb94Ik1Z+93iGO27err7w6l54GQ==", ++ "win32-arm64": "sha512-GQoa6OrQ8G08guMFgeXPH7yE/8Dt0IfOGWJSfSH4uafwdC7rWwrfE6P9N8AtPGIjUzdo2+7bN8Xo3qC578olhg==", + }, + "0.19.8": { + "npm": "sha512-l7iffQpT2OrZfH2rXIp7/FkmaeZM0vxbxN9KfiCwGYuZqzMg/JdvX26R31Zxn/Pxvsrg3Y9N6XTcnknqDyyv4w==", From 3f7e4b6e7fecf17b0ad27cd703ace38fac1b84ee Mon Sep 17 00:00:00 2001 From: Sunil Pai Date: Wed, 8 Apr 2026 16:34:44 +0100 Subject: [PATCH 7/9] Mark OCI container targets as Linux-only The oci_load and multirun targets in images/ were missing target_compatible_with constraints, causing toolchain resolution failures on Windows (both x64 and ARM64). The oci_image target already had the Linux constraint but the load/multirun targets that depend on it did not. Made-with: Cursor --- images/BUILD.bazel | 6 ++++++ images/container-client-test/BUILD.bazel | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/images/BUILD.bazel b/images/BUILD.bazel index 91c80184435..60258f4ab28 100644 --- a/images/BUILD.bazel +++ b/images/BUILD.bazel @@ -9,6 +9,9 @@ IMAGES = { command( name = name, command = target, + target_compatible_with = [ + "@platforms//os:linux", + ], ) for (name, target) in IMAGES.items() ] @@ -16,4 +19,7 @@ IMAGES = { multirun( name = "load_all", commands = IMAGES.keys(), + target_compatible_with = [ + "@platforms//os:linux", + ], ) diff --git a/images/container-client-test/BUILD.bazel b/images/container-client-test/BUILD.bazel index 510b9d28d99..a47b0610a31 100644 --- a/images/container-client-test/BUILD.bazel +++ b/images/container-client-test/BUILD.bazel @@ -37,6 +37,9 @@ oci_load( name = "load", image = ":image", repo_tags = ["cloudflare/workerd/container-client-test:latest"], + target_compatible_with = [ + "@platforms//os:linux", + ], visibility = ["//visibility:public"], ) @@ -44,5 +47,8 @@ oci_load( name = "load-proxy-everything", image = "@proxy_everything", repo_tags = ["cloudflare/proxy-everything:main"], + target_compatible_with = [ + "@platforms//os:linux", + ], visibility = ["//visibility:public"], ) From d0b90bc96ff88ec8652e62ba6d2d9ca91f865657 Mon Sep 17 00:00:00 2001 From: Sunil Pai Date: Wed, 8 Apr 2026 18:04:02 +0100 Subject: [PATCH 8/9] Increase test timeouts for ARM64 Windows CI The windows-11-arm runner has 4 vCPUs (vs 16 for windows-2025-16core), so tests need longer timeouts. Four tests were timing out at the default limits (3s/15s/60s/240s for small/medium/large/enormous). Increase to 15s/60s/240s/240s to match the slower hardware. Made-with: Cursor --- build/ci.bazelrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/ci.bazelrc b/build/ci.bazelrc index 3410d74c51b..0423e44dc38 100644 --- a/build/ci.bazelrc +++ b/build/ci.bazelrc @@ -97,6 +97,8 @@ test:ci-linux --test_size_filters= test:ci-macOS --test_size_filters= test:ci-windows --test_size_filters= test:ci-windows-arm64 --test_size_filters= +# The windows-11-arm runner has only 4 vCPUs (vs 16 for x64 Windows), so tests need more time. +test:ci-windows-arm64 --test_timeout=15,60,240,240 # Run container tests on Linux CI test:ci-linux --test_tag_filters=-off-by-default,-requires-fuzzilli From 193ca0e351334236b5d76162c0a382b2492798cc Mon Sep 17 00:00:00 2001 From: Sunil Pai Date: Fri, 10 Apr 2026 06:48:17 +0100 Subject: [PATCH 9/9] Link compiler-rt builtins on ARM64 Windows clang-cl on ARM64 Windows doesn't automatically link the compiler-rt builtins library, causing undefined symbol errors for 128-bit integer operations like __udivti3 (used by V8's bigint division). The library is available in the LLVM lib path but needs to be linked explicitly. Made-with: Cursor --- .bazelrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.bazelrc b/.bazelrc index c6daeefd1bc..49367fbe744 100644 --- a/.bazelrc +++ b/.bazelrc @@ -351,6 +351,9 @@ build:windows --extra_execution_platforms=//:x64_windows-clang-cl # runner, query @local_config_cc//:all to find the correct name. build:windows_arm64 --extra_toolchains=@local_config_cc//:cc-toolchain-arm64_windows-clang-cl build:windows_arm64 --extra_execution_platforms=//:arm64_windows-clang-cl +# clang-cl on ARM64 Windows doesn't auto-link compiler-rt builtins, causing undefined symbols +# like __udivti3 (128-bit integer division). Link the builtins library explicitly. +build:windows_arm64 --linkopt=clang_rt.builtins-aarch64.lib # The Windows fastbuild bazel configuration is broken in that it necessarily generates PDB debug # information while the Linux and macOS toolchains only compile with debug information in the dbg