diff --git a/.bazelrc b/.bazelrc index b5142789eb8..eac23050e09 100644 --- a/.bazelrc +++ b/.bazelrc @@ -303,8 +303,12 @@ build:windows --enable_runfiles # used by some KJ macros, and understands the `.c++` extension by default. # As of bazel 7, toolchain resolution is enabled by default, so we need to define a platform for # the clang-cl build. -build:windows --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl -build:windows --extra_execution_platforms=//:x64_windows-clang-cl +#build:windows_x64 --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl +#build:windows_x64 --extra_execution_platforms=//:x64_windows-clang-cl +#build:windows_arm64 --extra_toolchains=@local_config_cc//:cc-toolchain-arm64_windows-clang-cl +#build:windows_arm64 --extra_execution_platforms=//:arm64_windows-clang-cl +build:windows --extra_toolchains=@local_config_cc//:cc-toolchain-arm64_windows-clang-cl +build:windows --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 diff --git a/.github/workflows/_bazel.yml b/.github/workflows/_bazel.yml index 14f34d5cc2d..89f02abfe24 100644 --- a/.github/workflows/_bazel.yml +++ b/.github/workflows/_bazel.yml @@ -66,7 +66,7 @@ jobs: sudo apt-get install -y --no-install-recommends clang-18 lld-18 libunwind-18 libc++abi1-18 libc++1-18 libc++-18-dev libclang-rt-18-dev llvm-18 sed -i -e "s%llvm-symbolizer%/usr/lib/llvm-18/bin/llvm-symbolizer%" .bazelrc - name: Setup Windows - if: inputs.os_name == 'windows' + if: inputs.os_name == 'windows' || inputs.os_name == 'windows-arm' # Set a custom output root directory to avoid long file name issues. run: | git config --global core.symlinks true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d73d4dec789..00633fd31a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,6 +35,7 @@ jobs: { name: linux-arm, image: ubuntu-22.04-arm }, { name: macOS, image: macos-15 }, { name: windows, image: windows-2025 }, + { name: windows-arm, image: windows-11-arm }, ] config: [ # Default build: no suffix or additional bazel arguments @@ -55,6 +56,8 @@ jobs: exclude: - os: { name: windows, image: windows-2025 } config: { suffix: -debug } + - os: { name: windows-arm, 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/0001-Add-Windows-arm64-support.patch b/0001-Add-Windows-arm64-support.patch new file mode 100644 index 00000000000..6bd06614b81 --- /dev/null +++ b/0001-Add-Windows-arm64-support.patch @@ -0,0 +1,211 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Felix Hanau +Date: Sat, 3 May 2025 18:39:12 -0400 +Subject: Add Windows arm64 support + + +diff --git a/docs/repo_utils.md b/docs/repo_utils.md +index 4d61bb21927ae8f39b50958706924fd8f9633b46..4cdcb6622083e491d7a0f83ef259ad70fd8d239a 100644 +--- a/docs/repo_utils.md ++++ b/docs/repo_utils.md +@@ -194,6 +194,7 @@ Common os & architecture pairs that are returned are, + - linux_s390x + - linux_ppc64le + - windows_amd64 ++- windows_arm64 + + + **PARAMETERS** +diff --git a/lib/private/copy_directory_toolchain.bzl b/lib/private/copy_directory_toolchain.bzl +index 82329e4e4b3b7411248a1f170f473363d9c3038c..ebf6541c18e9d8b93c9e5aaa2aa9e109993f0a9e 100644 +--- a/lib/private/copy_directory_toolchain.bzl ++++ b/lib/private/copy_directory_toolchain.bzl +@@ -48,6 +48,12 @@ COPY_DIRECTORY_PLATFORMS = { + "@platforms//cpu:x86_64", + ], + ), ++ "windows_arm64": struct( ++ compatible_with = [ ++ "@platforms//os:windows", ++ "@platforms//cpu:aarch64", ++ ], ++ ), + } + + CopyToDirectoryInfo = provider( +diff --git a/lib/private/copy_to_directory_toolchain.bzl b/lib/private/copy_to_directory_toolchain.bzl +index 42fe1f19d75edbe62c3840bfce86bfcca2cb6839..dad26bfc2f72f6f4d86bc5a7a9b3fd1cc38145cf 100644 +--- a/lib/private/copy_to_directory_toolchain.bzl ++++ b/lib/private/copy_to_directory_toolchain.bzl +@@ -48,6 +48,12 @@ COPY_TO_DIRECTORY_PLATFORMS = { + "@platforms//cpu:x86_64", + ], + ), ++ "windows_arm64": struct( ++ compatible_with = [ ++ "@platforms//os:windows", ++ "@platforms//cpu:aarch64", ++ ], ++ ), + } + + CopyToDirectoryInfo = provider( +diff --git a/lib/private/coreutils_toolchain.bzl b/lib/private/coreutils_toolchain.bzl +index a288464864f91eb21df2476c269bd3d24707f1f5..6b50718fd5d2334d29af64f3224a7ca30927e37e 100644 +--- a/lib/private/coreutils_toolchain.bzl ++++ b/lib/private/coreutils_toolchain.bzl +@@ -32,6 +32,12 @@ COREUTILS_PLATFORMS = { + "@platforms//cpu:x86_64", + ], + ), ++ "windows_arm64": struct( ++ compatible_with = [ ++ "@platforms//os:windows", ++ "@platforms//cpu:aarch64", ++ ], ++ ), + } + + # https://github.com/uutils/coreutils/releases +@@ -39,11 +45,41 @@ COREUTILS_PLATFORMS = { + # The integrity hashes can be automatically fetched for the coreutils releases by running + # `tools/coreutils_mirror_release.sh`. + COREUTILS_VERSIONS = { ++ "0.0.30": { ++ "darwin_arm64": { ++ "filename": "coreutils-0.0.30-aarch64-apple-darwin.tar.gz", ++ "sha256": "sha256-Hr8wERvrhvPSa0LFobCaZmBxSwinqvP/IzMh+ohQPW8=" ++ }, ++ "windows_arm64": { ++ "filename": "coreutils-0.0.30-aarch64-pc-windows-msvc.zip", ++ "sha256": "sha256-MP6aM2P4bvQ/KG4qQD27XO272vn+uZRs903RSlZWqrs=" ++ }, ++ "linux_arm64": { ++ "filename": "coreutils-0.0.30-aarch64-unknown-linux-musl.tar.gz", ++ "sha256": "sha256-4Gl5zOyO0xd/DblwdkIOyD5UhFAaSAjhEyBran+KqYg=" ++ }, ++ "darwin_amd64": { ++ "filename": "coreutils-0.0.30-x86_64-apple-darwin.tar.gz", ++ "sha256": "sha256-meue6x/kLNDRJbq8TzahJ/qiLfuoIMhhL8hj52M3qzQ=" ++ }, ++ "windows_amd64": { ++ "filename": "coreutils-0.0.30-x86_64-pc-windows-msvc.zip", ++ "sha256": "sha256-OTH1cP8mZdsJswYUUhcSzB0xQmeT4Yml23BNLEBZm6k=" ++ }, ++ "linux_amd64": { ++ "filename": "coreutils-0.0.30-x86_64-unknown-linux-musl.tar.gz", ++ "sha256": "sha256-lI98IeTtCMcFMuPMv6xWPaIzVA2lU6ldTCfiYASay3w=" ++ } ++ }, + "0.0.27": { + "darwin_arm64": { + "filename": "coreutils-0.0.27-aarch64-apple-darwin.tar.gz", + "sha256": "sha256-BjAeGgJ8+sLCIwmokCOkfelCCLtnNRH49QcFnrDq8a4=", + }, ++ "windows_arm64": { ++ "filename": "coreutils-0.0.27-x86_64-pc-windows-msvc.zip", ++ "sha256": "sha256-DC4H+hQX51aHoFudV39n7u217NDcNL9AiG4o4edboV0=", ++ }, + "linux_arm64": { + "filename": "coreutils-0.0.27-aarch64-unknown-linux-musl.tar.gz", + "sha256": "sha256-doU+ZfTyA5I8RSwDAcsOkEI3BZXFuFwBfEbg+diS06g=", +diff --git a/lib/private/expand_template_toolchain.bzl b/lib/private/expand_template_toolchain.bzl +index 5c9f9dd4c6301fe32e47e726fec91b11050db12c..89d831ee28f7dcaff641538563c328b63469b35e 100644 +--- a/lib/private/expand_template_toolchain.bzl ++++ b/lib/private/expand_template_toolchain.bzl +@@ -48,6 +48,12 @@ EXPAND_TEMPLATE_PLATFORMS = { + "@platforms//cpu:x86_64", + ], + ), ++ "windows_arm64": struct( ++ compatible_with = [ ++ "@platforms//os:windows", ++ "@platforms//cpu:aarch64", ++ ], ++ ), + } + + ExpandTemplateInfo = provider( +diff --git a/lib/private/jq_toolchain.bzl b/lib/private/jq_toolchain.bzl +index f76eeefc8073e45e16b4ce2d421ba922609d0669..7969b4ec236a0b09faf5d7b33498a1029a2b80b5 100644 +--- a/lib/private/jq_toolchain.bzl ++++ b/lib/private/jq_toolchain.bzl +@@ -39,6 +39,13 @@ JQ_PLATFORMS = { + "@platforms//cpu:x86_64", + ], + ), ++ "windows_arm64": struct( ++ release_platform = "win64", ++ compatible_with = [ ++ "@platforms//os:windows", ++ "@platforms//cpu:x86_64", ++ ], ++ ), + } + + DEFAULT_JQ_VERSION = "1.7" +diff --git a/lib/private/repo_utils.bzl b/lib/private/repo_utils.bzl +index e700c3e91940857978abb7257a7047700d815ac8..001994c9216b1bdf492d7a80e0972e7264669522 100644 +--- a/lib/private/repo_utils.bzl ++++ b/lib/private/repo_utils.bzl +@@ -78,6 +78,7 @@ def _platform(rctx): + - linux_s390x + - linux_ppc64le + - windows_amd64 ++ - windows_arm64 + + Args: + rctx: rctx +diff --git a/lib/private/yq_toolchain.bzl b/lib/private/yq_toolchain.bzl +index 4aee1e0c1c8b9359d68cd87798249af490c162b2..87ba7483ce9b8b16e29ee986f64a28bdfaea00ca 100644 +--- a/lib/private/yq_toolchain.bzl ++++ b/lib/private/yq_toolchain.bzl +@@ -46,11 +46,17 @@ YQ_PLATFORMS = { + "@platforms//cpu:x86_64", + ], + ), ++ "windows_arm64": struct( ++ compatible_with = [ ++ "@platforms//os:windows", ++ "@platforms//cpu:aarch64", ++ ], ++ ), + } + + # Note: this is not the latest release, because it has significant breaking changes. + # See https://github.com/bazel-contrib/bazel-lib/pull/421 +-DEFAULT_YQ_VERSION = "4.25.2" ++DEFAULT_YQ_VERSION = "4.45.2" + + # https://github.com/mikefarah/yq/releases + # +@@ -61,6 +67,16 @@ DEFAULT_YQ_VERSION = "4.25.2" + # Alternatively, you can compute them manually by running + # `shasum -b -a 384 [downloaded file] | awk '{ print $1 }' | xxd -r -p | base64` + YQ_VERSIONS = { ++ "4.45.2": { ++ "darwin_amd64": "sha384-TBsrUTy6n6qA2hiSlpnEN6iEDDz4Tiy++AxLOpeXU1aUaI6uIuEBx8hgPYWWuD8V", ++ "darwin_arm64": "sha384-bnZ5TqsG5pcWB6gC87QKrBrjcKYmdOcSD7TpFVeCU6Nj7z5egeZzm4BH1FHbqo0e", ++ "linux_amd64": "sha384-jEOdMXHPvRiaFXWRnSA5Mw41VCKkNPv42i35i9BiVxrAnfyl/3/Li/iyQyj16QIr", ++ "linux_arm64": "sha384-4bEWn6fDQhIomb6Smzm8yw26RvqsjHh3PH/SogwWoLC9uJRoyQagY2PJZaYWxUDY", ++ "linux_s390x": "sha384-9uU3CXqjUG/SuPiHPKIUqbOVyqx7JiVOtRzeFta9IBFkJyUB0pBBOYkoDppvrmzz", ++ "linux_ppc64le": "sha384-bB03rZ0ptRt2EuFnA9SvscPMe3gVJecBvxhzPbYe7wsfoHvzzYqWffCchZVxRg+9", ++ "windows_amd64": "sha384-vG8R2+s/sD8DbeCM9H0xCy5JgtAOII7SLRx2g+ALtQZWW/q3XjXlzN2CKW/zU+EH", ++ "windows_arm64": "sha384-XHgi894S4cQ2qgJx47cPu5vtb2MOXA2YZ7QgExODwNoIPhji5wXK2MrgMB+RI7gZ", ++ }, + "4.33.3": { + "darwin_amd64": "sha384-IJhMHD71yq+OR8AHFPfZr3XVpFlG2ZAfcexDKojtSLcCMV1pw0X2jza4qFUZiKEt", + "darwin_arm64": "sha384-euQkz1Bu/dFuJoRgG4xIh9BhP2RvOceTDPSY8EzSIM5xykbMkwDNhr1PtCcUF5ye", +diff --git a/tools/yq_mirror_release.sh b/tools/yq_mirror_release.sh +index 2b81f2f1a84a819a1e41e7965307221abcd30063..53550b80b9afcbb8bc07dabee16f3dd79208c53b 100755 +--- a/tools/yq_mirror_release.sh ++++ b/tools/yq_mirror_release.sh +@@ -21,7 +21,7 @@ chmod u+x extract-checksum.sh + + # Extract the checksums and output a starlark map entry + echo "\"$version\": {" +-platforms=(darwin_{amd64,arm64} linux_{amd64,arm64,s390x,ppc64le} windows_amd64) ++platforms=(darwin_{amd64,arm64} linux_{amd64,arm64,s390x,ppc64le} windows_{amd64,arm64}) + for release in ${platforms[@]}; do + artifact=$release + if [[ $release == windows* ]]; then diff --git a/BUILD.bazel b/BUILD.bazel index 750ac5bba53..9b99c93fe5b 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,4 +1,3 @@ -load("@aspect_rules_js//js:defs.bzl", "js_library") load("@aspect_rules_js//npm:defs.bzl", "npm_link_package") load("@bazel_skylib//lib:selects.bzl", "selects") load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") @@ -28,7 +27,7 @@ capnp_es_binary.capnp_es_binary( visibility = ["//visibility:public"], ) -# Platform definition for using clang-cl on Windows +# Platform definitions for using clang-cl on Windows platform( name = "x64_windows-clang-cl", constraint_values = [ @@ -38,6 +37,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/build/ci.bazelrc b/build/ci.bazelrc index b2d5d6650e1..60f8228371b 100644 --- a/build/ci.bazelrc +++ b/build/ci.bazelrc @@ -80,6 +80,7 @@ build:ci-macOS --copt=-UDEBUG build:ci-macOS-debug --config=debug build:ci-windows --config=windows_no_dbg +build:ci-windows-arm --config=windows_no_dbg build:ci-windows-debug --config=debug # Some tests (like Python import tests) take a long time to run, especially when debug is enabled diff --git a/build/deps/build_deps.jsonc b/build/deps/build_deps.jsonc index 117170f4e19..e8648b825ea 100644 --- a/build/deps/build_deps.jsonc +++ b/build/deps/build_deps.jsonc @@ -111,6 +111,15 @@ "repo": "rules_nodejs", "file_regex": "^rules_nodejs-.*\\.tar\\.gz$" }, + { + // Needed for aspect_rules_js, build fails on Windows if it is not fetched explicitly. + // rules_js 2.1.0 uses a fixed version, once we update to that version this can be dropped. + "name": "aspect_bazel_lib", + "type": "github_release", + "owner": "bazel-contrib", + "repo": "bazel-lib", + "file_regex": "^bazel-lib-.*\\.tar\\.gz$" + }, { "name": "aspect_rules_js", "type": "github_release", diff --git a/build/deps/gen/build_deps.bzl b/build/deps/gen/build_deps.bzl index 6847f61a899..398859dc78c 100644 --- a/build/deps/gen/build_deps.bzl +++ b/build/deps/gen/build_deps.bzl @@ -1,5 +1,6 @@ # WARNING: THIS FILE IS AUTOGENERATED BY update-deps.py DO NOT EDIT +load("@//build/deps:gen/dep_aspect_bazel_lib.bzl", "dep_aspect_bazel_lib") load("@//build/deps:gen/dep_aspect_rules_esbuild.bzl", "dep_aspect_rules_esbuild") load("@//build/deps:gen/dep_aspect_rules_js.bzl", "dep_aspect_rules_js") load("@//build/deps:gen/dep_aspect_rules_ts.bzl", "dep_aspect_rules_ts") @@ -36,6 +37,7 @@ def deps_gen(): dep_rules_shell() dep_aspect_rules_esbuild() dep_rules_nodejs() + dep_aspect_bazel_lib() dep_aspect_rules_js() dep_aspect_rules_ts() dep_clang_format_linux_amd64() diff --git a/build/deps/gen/dep_aspect_bazel_lib.bzl b/build/deps/gen/dep_aspect_bazel_lib.bzl index e69de29bb2d..79bb1851e7d 100644 --- a/build/deps/gen/dep_aspect_bazel_lib.bzl +++ b/build/deps/gen/dep_aspect_bazel_lib.bzl @@ -0,0 +1,22 @@ +# WARNING: THIS FILE IS AUTOGENERATED BY update-deps.py DO NOT EDIT + +load("@//:build/http.bzl", "http_archive") + +TAG_NAME = "v2.15.3" +URL = "https://github.com/bazel-contrib/bazel-lib/releases/download/v2.15.3/bazel-lib-v2.15.3.tar.gz" +STRIP_PREFIX = "bazel-lib-2.15.3" +SHA256 = "2be8a5df0b20b0ed37604b050da01dbf7ad45ad44768c0d478b64779b9f58412" +TYPE = "tgz" + +def dep_aspect_bazel_lib(): + http_archive( + name = "aspect_bazel_lib", + url = URL, + strip_prefix = STRIP_PREFIX, + type = TYPE, + sha256 = SHA256, + patch_args = ["-p1"], + patches = [ + "//:0001-Add-Windows-arm64-support.patch", + ], + ) diff --git a/deps/rust/BUILD.bazel b/deps/rust/BUILD.bazel index 3a609506c68..4631bf27973 100644 --- a/deps/rust/BUILD.bazel +++ b/deps/rust/BUILD.bazel @@ -44,12 +44,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", + # TODO(use native arm64 binary) + ":win_arm64": "@cargo_bazel_win_x64//file:downloaded.exe", }) # Generates a repository containing all the crates we reference from our @@ -73,6 +83,7 @@ crates_vendor( "aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc", + "aarch64-pc-windows-msvc", ], ) diff --git a/deps/rust/crates/BUILD.backtrace-0.3.74.bazel b/deps/rust/crates/BUILD.backtrace-0.3.74.bazel index d460ef752f3..ac37bbc3f39 100644 --- a/deps/rust/crates/BUILD.backtrace-0.3.74.bazel +++ b/deps/rust/crates/BUILD.backtrace-0.3.74.bazel @@ -51,6 +51,9 @@ rust_library( "@crates_vendor__miniz_oxide-0.8.8//:miniz_oxide", # cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp")))) "@crates_vendor__object-0.36.7//:object", # cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp")))) ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__windows-targets-0.52.6//:windows_targets", # cfg(windows) + ], "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ "@crates_vendor__addr2line-0.24.2//:addr2line", # cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp")))) "@crates_vendor__libc-0.2.172//:libc", # cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp")))) diff --git a/deps/rust/crates/BUILD.mio-1.0.3.bazel b/deps/rust/crates/BUILD.mio-1.0.3.bazel index 3a93167a734..9842b12f9fd 100644 --- a/deps/rust/crates/BUILD.mio-1.0.3.bazel +++ b/deps/rust/crates/BUILD.mio-1.0.3.bazel @@ -50,6 +50,9 @@ rust_library( "@rules_rust//rust/platform:aarch64-apple-darwin": [ "@crates_vendor__libc-0.2.172//:libc", # cfg(unix) ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__windows-sys-0.52.0//:windows_sys", # cfg(windows) + ], "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ "@crates_vendor__libc-0.2.172//:libc", # cfg(unix) ], diff --git a/deps/rust/crates/BUILD.socket2-0.5.9.bazel b/deps/rust/crates/BUILD.socket2-0.5.9.bazel index 5542c546f9f..11044b398aa 100644 --- a/deps/rust/crates/BUILD.socket2-0.5.9.bazel +++ b/deps/rust/crates/BUILD.socket2-0.5.9.bazel @@ -48,6 +48,9 @@ rust_library( "@rules_rust//rust/platform:aarch64-apple-darwin": [ "@crates_vendor__libc-0.2.172//:libc", # cfg(unix) ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__windows-sys-0.52.0//:windows_sys", # cfg(windows) + ], "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ "@crates_vendor__libc-0.2.172//:libc", # cfg(unix) ], diff --git a/deps/rust/crates/BUILD.termcolor-1.4.1.bazel b/deps/rust/crates/BUILD.termcolor-1.4.1.bazel index 3e3d4fa7dc1..3c0eb237018 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.9//:winapi_util", # cfg(windows) + ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "@crates_vendor__winapi-util-0.1.9//:winapi_util", # cfg(windows) ], diff --git a/deps/rust/crates/BUILD.tokio-1.44.2.bazel b/deps/rust/crates/BUILD.tokio-1.44.2.bazel index 74fc3b1742e..f3c6cf09f33 100644 --- a/deps/rust/crates/BUILD.tokio-1.44.2.bazel +++ b/deps/rust/crates/BUILD.tokio-1.44.2.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 ], @@ -63,6 +66,9 @@ rust_library( "@rules_rust//rust/platform:aarch64-apple-darwin": [ "@crates_vendor__libc-0.2.172//:libc", # aarch64-apple-darwin ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__windows-sys-0.52.0//:windows_sys", # aarch64-pc-windows-msvc + ], "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ "@crates_vendor__libc-0.2.172//:libc", # aarch64-unknown-linux-gnu ], diff --git a/deps/rust/crates/BUILD.winapi-util-0.1.9.bazel b/deps/rust/crates/BUILD.winapi-util-0.1.9.bazel index 7f29d7a8041..46b0b7755e3 100644 --- a/deps/rust/crates/BUILD.winapi-util-0.1.9.bazel +++ b/deps/rust/crates/BUILD.winapi-util-0.1.9.bazel @@ -42,6 +42,9 @@ rust_library( ], version = "0.1.9", deps = select({ + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__windows-sys-0.59.0//:windows_sys", # cfg(windows) + ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "@crates_vendor__windows-sys-0.59.0//:windows_sys", # cfg(windows) ], diff --git a/deps/rust/crates/BUILD.windows-targets-0.52.6.bazel b/deps/rust/crates/BUILD.windows-targets-0.52.6.bazel index 68171c8dee9..c7857e9d649 100644 --- a/deps/rust/crates/BUILD.windows-targets-0.52.6.bazel +++ b/deps/rust/crates/BUILD.windows-targets-0.52.6.bazel @@ -42,6 +42,9 @@ rust_library( ], version = "0.52.6", deps = select({ + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@crates_vendor__windows_aarch64_msvc-0.52.6//:windows_aarch64_msvc", # cfg(all(target_arch = "aarch64", target_env = "msvc", not(windows_raw_dylib))) + ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "@crates_vendor__windows_x86_64_msvc-0.52.6//:windows_x86_64_msvc", # cfg(all(any(target_arch = "x86_64", target_arch = "arm64ec"), target_env = "msvc", not(windows_raw_dylib))) ], diff --git a/deps/rust/crates/defs.bzl b/deps/rust/crates/defs.bzl index 3fd6eda518e..1d4b58a4466 100644 --- a/deps/rust/crates/defs.bzl +++ b/deps/rust/crates/defs.bzl @@ -386,9 +386,10 @@ _BUILD_PROC_MACRO_ALIASES = { _CONDITIONS = { "aarch64-apple-darwin": ["@rules_rust//rust/platform:aarch64-apple-darwin"], "aarch64-pc-windows-gnullvm": [], + "aarch64-pc-windows-msvc": ["@rules_rust//rust/platform:aarch64-pc-windows-msvc"], "aarch64-unknown-linux-gnu": ["@rules_rust//rust/platform:aarch64-unknown-linux-gnu"], "cfg(all(any(target_arch = \"x86_64\", target_arch = \"arm64ec\"), target_env = \"msvc\", not(windows_raw_dylib)))": ["@rules_rust//rust/platform:x86_64-pc-windows-msvc"], - "cfg(all(target_arch = \"aarch64\", target_env = \"msvc\", not(windows_raw_dylib)))": [], + "cfg(all(target_arch = \"aarch64\", target_env = \"msvc\", not(windows_raw_dylib)))": ["@rules_rust//rust/platform:aarch64-pc-windows-msvc"], "cfg(all(target_arch = \"x86\", target_env = \"gnu\", not(target_abi = \"llvm\"), not(windows_raw_dylib)))": [], "cfg(all(target_arch = \"x86\", target_env = \"msvc\", not(windows_raw_dylib)))": [], "cfg(all(target_arch = \"x86_64\", target_env = \"gnu\", not(target_abi = \"llvm\"), not(windows_raw_dylib)))": ["@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], @@ -398,7 +399,7 @@ _CONDITIONS = { "cfg(target_os = \"wasi\")": [], "cfg(tokio_taskdump)": [], "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"], "i686-pc-windows-gnullvm": [], "x86_64-apple-darwin": ["@rules_rust//rust/platform:x86_64-apple-darwin"], "x86_64-pc-windows-gnullvm": [],