Skip to content

Commit 2f64fec

Browse files
Use x86 hosted msvc on arm64 windows (#522)
* Use x86 hosted msvc on arm64 windows * added comment
1 parent 77c9441 commit 2f64fec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/windows_registry.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,9 @@ mod impl_ {
375375
let host = match host_arch() {
376376
X86 => "X86",
377377
X86_64 => "X64",
378+
// There is no natively hosted compiler on ARM64.
379+
// Instead, use the x86 toolchain under emulation (there is no x64 emulation).
380+
AARCH64 => "X86",
378381
_ => return None,
379382
};
380383
let target = lib_subdir(target)?;
@@ -607,8 +610,10 @@ mod impl_ {
607610

608611
const PROCESSOR_ARCHITECTURE_INTEL: u16 = 0;
609612
const PROCESSOR_ARCHITECTURE_AMD64: u16 = 9;
613+
const PROCESSOR_ARCHITECTURE_ARM64: u16 = 12;
610614
const X86: u16 = PROCESSOR_ARCHITECTURE_INTEL;
611615
const X86_64: u16 = PROCESSOR_ARCHITECTURE_AMD64;
616+
const AARCH64: u16 = PROCESSOR_ARCHITECTURE_ARM64;
612617

613618
// When choosing the tool to use, we have to choose the one which matches
614619
// the target architecture. Otherwise we end up in situations where someone

0 commit comments

Comments
 (0)