Skip to content

Commit a1bc46e

Browse files
authored
Merge pull request #82 from jdm/win-arm64
Add support for arm64 Windows targets.
2 parents e0c9a8f + f77020f commit a1bc46e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,9 @@ impl Config {
420420
} else if target.contains("thumbv7a") {
421421
cmd.arg("-Thost=x64");
422422
cmd.arg("-Aarm");
423+
} else if target.contains("aarch64") {
424+
cmd.arg("-Thost=x64");
425+
cmd.arg("-AARM64");
423426
} else if target.contains("i686") {
424427
use cc::windows_registry::{find_vs_version, VsVers};
425428
match find_vs_version() {
@@ -737,7 +740,7 @@ impl Config {
737740
),
738741
Err(msg) => panic!(msg),
739742
};
740-
if target.contains("i686") || target.contains("x86_64") || target.contains("thumbv7a") {
743+
if ["i686", "x86_64", "thumbv7a", "aarch64"].iter().any(|t| target.contains(t)) {
741744
base.to_string()
742745
} else {
743746
panic!("unsupported msvc target: {}", target);

0 commit comments

Comments
 (0)