Skip to content

Commit 7184123

Browse files
committed
Add an aarch64-pc-windows-msvc target
1 parent 31ad352 commit 7184123

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

crates/uv-configuration/src/target_triple.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ pub enum TargetTriple {
2828
#[serde(alias = "x8664-pc-windows-msvc")]
2929
X8664PcWindowsMsvc,
3030

31+
/// A 64-bit ARM64 Windows target.
32+
#[cfg_attr(feature = "clap", value(name = "aarch64-pc-windows-msvc"))]
33+
#[serde(rename = "aarch64-pc-windows-msvc")]
34+
#[serde(alias = "arm64-pc-windows-msvc")]
35+
Aarch64PcWindowsMsvc,
36+
3137
/// A 32-bit x86 Windows target.
3238
#[cfg_attr(feature = "clap", value(name = "i686-pc-windows-msvc"))]
3339
#[serde(rename = "i686-pc-windows-msvc")]
@@ -237,6 +243,7 @@ impl TargetTriple {
237243
pub fn platform(self) -> Platform {
238244
match self {
239245
Self::Windows | Self::X8664PcWindowsMsvc => Platform::new(Os::Windows, Arch::X86_64),
246+
Self::Aarch64PcWindowsMsvc => Platform::new(Os::Windows, Arch::Aarch64),
240247
Self::Linux | Self::X8664UnknownLinuxGnu => Platform::new(
241248
Os::Manylinux {
242249
major: 2,
@@ -468,6 +475,7 @@ impl TargetTriple {
468475
pub fn platform_machine(self) -> &'static str {
469476
match self {
470477
Self::Windows | Self::X8664PcWindowsMsvc => "x86_64",
478+
Self::Aarch64PcWindowsMsvc => "aarch64",
471479
Self::Linux | Self::X8664UnknownLinuxGnu => "x86_64",
472480
Self::Macos | Self::Aarch64AppleDarwin => "arm64",
473481
Self::I686PcWindowsMsvc => "x86",
@@ -509,6 +517,7 @@ impl TargetTriple {
509517
pub fn platform_system(self) -> &'static str {
510518
match self {
511519
Self::Windows | Self::X8664PcWindowsMsvc => "Windows",
520+
Self::Aarch64PcWindowsMsvc => "Windows",
512521
Self::Linux | Self::X8664UnknownLinuxGnu => "Linux",
513522
Self::Macos | Self::Aarch64AppleDarwin => "Darwin",
514523
Self::I686PcWindowsMsvc => "Windows",
@@ -550,6 +559,7 @@ impl TargetTriple {
550559
pub fn platform_version(self) -> &'static str {
551560
match self {
552561
Self::Windows | Self::X8664PcWindowsMsvc => "",
562+
Self::Aarch64PcWindowsMsvc => "",
553563
Self::Linux | Self::X8664UnknownLinuxGnu => "",
554564
Self::Macos | Self::Aarch64AppleDarwin => "",
555565
Self::I686PcWindowsMsvc => "",
@@ -594,6 +604,7 @@ impl TargetTriple {
594604
pub fn platform_release(self) -> &'static str {
595605
match self {
596606
Self::Windows | Self::X8664PcWindowsMsvc => "",
607+
Self::Aarch64PcWindowsMsvc => "",
597608
Self::Linux | Self::X8664UnknownLinuxGnu => "",
598609
Self::Macos | Self::Aarch64AppleDarwin => "",
599610
Self::I686PcWindowsMsvc => "",
@@ -637,6 +648,7 @@ impl TargetTriple {
637648
pub fn os_name(self) -> &'static str {
638649
match self {
639650
Self::Windows | Self::X8664PcWindowsMsvc => "nt",
651+
Self::Aarch64PcWindowsMsvc => "nt",
640652
Self::Linux | Self::X8664UnknownLinuxGnu => "posix",
641653
Self::Macos | Self::Aarch64AppleDarwin => "posix",
642654
Self::I686PcWindowsMsvc => "nt",
@@ -678,6 +690,7 @@ impl TargetTriple {
678690
pub fn sys_platform(self) -> &'static str {
679691
match self {
680692
Self::Windows | Self::X8664PcWindowsMsvc => "win32",
693+
Self::Aarch64PcWindowsMsvc => "win32",
681694
Self::Linux | Self::X8664UnknownLinuxGnu => "linux",
682695
Self::Macos | Self::Aarch64AppleDarwin => "darwin",
683696
Self::I686PcWindowsMsvc => "win32",
@@ -719,6 +732,7 @@ impl TargetTriple {
719732
pub fn manylinux_compatible(self) -> bool {
720733
match self {
721734
Self::Windows | Self::X8664PcWindowsMsvc => false,
735+
Self::Aarch64PcWindowsMsvc => false,
722736
Self::Linux | Self::X8664UnknownLinuxGnu => true,
723737
Self::Macos | Self::Aarch64AppleDarwin => false,
724738
Self::I686PcWindowsMsvc => false,

0 commit comments

Comments
 (0)