Skip to content

Commit 6afaa2d

Browse files
committed
Support aarch64 Windows arch in TargetTriple::from_host()
1 parent c33cb5e commit 6afaa2d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/src/installation/windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ tools" and "Windows 10 SDK" option. No additional software installation is
1616
necessary for basic use of the GNU build.
1717

1818
By default `rustup` on Windows configures Rust to target the MSVC ABI, that is
19-
a target triple of either `i686-pc-windows-msvc` or `x86_64-pc-windows-msvc`
19+
a target triple of either `i686-pc-windows-msvc`, `x86_64-pc-windows-msvc`, or `aarch64-pc-windows-msvc`
2020
depending on the CPU architecture of the host Windows OS. The toolchains that
2121
`rustup` chooses to install, unless told otherwise through the [toolchain
2222
specification], will be compiled to run on that target triple host and will

src/dist/dist.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ impl TargetTriple {
234234
// First detect architecture
235235
const PROCESSOR_ARCHITECTURE_AMD64: u16 = 9;
236236
const PROCESSOR_ARCHITECTURE_INTEL: u16 = 0;
237+
const PROCESSOR_ARCHITECTURE_ARM64: u16 = 12;
237238

238239
let mut sys_info;
239240
unsafe {
@@ -244,6 +245,7 @@ impl TargetTriple {
244245
let arch = match unsafe { sys_info.u.s() }.wProcessorArchitecture {
245246
PROCESSOR_ARCHITECTURE_AMD64 => "x86_64",
246247
PROCESSOR_ARCHITECTURE_INTEL => "i686",
248+
PROCESSOR_ARCHITECTURE_ARM64 => "aarch64",
247249
_ => return None,
248250
};
249251

0 commit comments

Comments
 (0)