Skip to content

Commit 0a4dc8b

Browse files
committed
Adds a GitHub Actions CI build for aarch64-pc-windows-msvc via cross-compilation on an x86_64 host.
This promotes aarch64-pc-windows-msvc from a Tier 2 Compilation Target (std) to a Tier 2 Development Platform (std+rustc+cargo+tools). Fixes #72881
1 parent 10ef7f9 commit 0a4dc8b

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

.github/workflows/ci.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ jobs:
473473
os: windows-latest-xl
474474
- name: dist-x86_64-msvc
475475
env:
476-
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc,aarch64-pc-windows-msvc --enable-full-tools --enable-profiler"
476+
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc --enable-full-tools --enable-profiler"
477477
SCRIPT: python x.py dist
478478
DIST_REQUIRE_ALL_TOOLS: 1
479479
os: windows-latest-xl
@@ -483,6 +483,12 @@ jobs:
483483
SCRIPT: python x.py dist
484484
DIST_REQUIRE_ALL_TOOLS: 1
485485
os: windows-latest-xl
486+
- name: dist-aarch64-msvc
487+
env:
488+
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=aarch64-pc-windows-msvc --enable-full-tools --enable-profiler"
489+
SCRIPT: python x.py dist
490+
DIST_REQUIRE_ALL_TOOLS: 0
491+
os: windows-latest-xl
486492
- name: dist-i686-mingw
487493
env:
488494
RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --enable-full-tools --enable-profiler"

src/ci/github-actions/ci.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ jobs:
576576
RUST_CONFIGURE_ARGS: >-
577577
--build=x86_64-pc-windows-msvc
578578
--host=x86_64-pc-windows-msvc
579-
--target=x86_64-pc-windows-msvc,aarch64-pc-windows-msvc
579+
--target=x86_64-pc-windows-msvc
580580
--enable-full-tools
581581
--enable-profiler
582582
SCRIPT: python x.py dist
@@ -595,6 +595,18 @@ jobs:
595595
DIST_REQUIRE_ALL_TOOLS: 1
596596
<<: *job-windows-xl
597597

598+
- name: dist-aarch64-msvc
599+
env:
600+
RUST_CONFIGURE_ARGS: >-
601+
--build=x86_64-pc-windows-msvc
602+
--host=aarch64-pc-windows-msvc
603+
--enable-full-tools
604+
--enable-profiler
605+
SCRIPT: python x.py dist
606+
# RLS does not build for aarch64-pc-windows-msvc. See rust-lang/rls#1693
607+
DIST_REQUIRE_ALL_TOOLS: 0
608+
<<: *job-windows-xl
609+
598610
- name: dist-i686-mingw
599611
env:
600612
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools --enable-profiler

src/ci/scripts/install-mingw.sh

+7
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ if isWindows; then
4242
arch=x86_64
4343
mingw_archive="${MINGW_ARCHIVE_64}"
4444
;;
45+
*aarch64*)
46+
# aarch64 is a cross-compiled target. Use the x86_64
47+
# mingw, since that's the host architecture.
48+
bits=64
49+
arch=x86_64
50+
mingw_archive="${MINGW_ARCHIVE_64}"
51+
;;
4552
*)
4653
echo "src/ci/scripts/install-mingw.sh can't detect the builder's architecture"
4754
echo "please tweak it to recognize the builder named '${CI_JOB_NAME}'"

src/doc/rustc/src/platform-support.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ target | std | host | notes
6060
`aarch64-apple-ios` | ✓[^apple] | | ARM64 iOS
6161
`aarch64-fuchsia` | ✓ | | ARM64 Fuchsia
6262
`aarch64-linux-android` | ✓ | | ARM64 Android
63-
`aarch64-pc-windows-msvc` | ✓ | | ARM64 Windows MSVC
63+
`aarch64-pc-windows-msvc` | ✓ | | ARM64 Windows MSVC
6464
`aarch64-unknown-linux-gnu` | ✓ | ✓ | ARM64 Linux (kernel 4.2, glibc 2.17)
6565
`aarch64-unknown-linux-musl` | ✓ | ✓ | ARM64 Linux with MUSL
6666
`aarch64-unknown-none` | * | | Bare ARM64, hardfloat

0 commit comments

Comments
 (0)