@@ -28,6 +28,12 @@ pub enum TargetTriple {
28
28
#[ serde( alias = "x8664-pc-windows-msvc" ) ]
29
29
X8664PcWindowsMsvc ,
30
30
31
+ /// An 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
+
31
37
/// A 32-bit x86 Windows target.
32
38
#[ cfg_attr( feature = "clap" , value( name = "i686-pc-windows-msvc" ) ) ]
33
39
#[ serde( rename = "i686-pc-windows-msvc" ) ]
@@ -237,6 +243,7 @@ impl TargetTriple {
237
243
pub fn platform ( self ) -> Platform {
238
244
match self {
239
245
Self :: Windows | Self :: X8664PcWindowsMsvc => Platform :: new ( Os :: Windows , Arch :: X86_64 ) ,
246
+ Self :: Aarch64PcWindowsMsvc => Platform :: new ( Os :: Windows , Arch :: Aarch64 ) ,
240
247
Self :: Linux | Self :: X8664UnknownLinuxGnu => Platform :: new (
241
248
Os :: Manylinux {
242
249
major : 2 ,
@@ -468,6 +475,7 @@ impl TargetTriple {
468
475
pub fn platform_machine ( self ) -> & ' static str {
469
476
match self {
470
477
Self :: Windows | Self :: X8664PcWindowsMsvc => "x86_64" ,
478
+ Self :: Aarch64PcWindowsMsvc => "ARM64" ,
471
479
Self :: Linux | Self :: X8664UnknownLinuxGnu => "x86_64" ,
472
480
Self :: Macos | Self :: Aarch64AppleDarwin => "arm64" ,
473
481
Self :: I686PcWindowsMsvc => "x86" ,
@@ -509,6 +517,7 @@ impl TargetTriple {
509
517
pub fn platform_system ( self ) -> & ' static str {
510
518
match self {
511
519
Self :: Windows | Self :: X8664PcWindowsMsvc => "Windows" ,
520
+ Self :: Aarch64PcWindowsMsvc => "Windows" ,
512
521
Self :: Linux | Self :: X8664UnknownLinuxGnu => "Linux" ,
513
522
Self :: Macos | Self :: Aarch64AppleDarwin => "Darwin" ,
514
523
Self :: I686PcWindowsMsvc => "Windows" ,
@@ -550,6 +559,7 @@ impl TargetTriple {
550
559
pub fn platform_version ( self ) -> & ' static str {
551
560
match self {
552
561
Self :: Windows | Self :: X8664PcWindowsMsvc => "" ,
562
+ Self :: Aarch64PcWindowsMsvc => "" ,
553
563
Self :: Linux | Self :: X8664UnknownLinuxGnu => "" ,
554
564
Self :: Macos | Self :: Aarch64AppleDarwin => "" ,
555
565
Self :: I686PcWindowsMsvc => "" ,
@@ -594,6 +604,7 @@ impl TargetTriple {
594
604
pub fn platform_release ( self ) -> & ' static str {
595
605
match self {
596
606
Self :: Windows | Self :: X8664PcWindowsMsvc => "" ,
607
+ Self :: Aarch64PcWindowsMsvc => "" ,
597
608
Self :: Linux | Self :: X8664UnknownLinuxGnu => "" ,
598
609
Self :: Macos | Self :: Aarch64AppleDarwin => "" ,
599
610
Self :: I686PcWindowsMsvc => "" ,
@@ -637,6 +648,7 @@ impl TargetTriple {
637
648
pub fn os_name ( self ) -> & ' static str {
638
649
match self {
639
650
Self :: Windows | Self :: X8664PcWindowsMsvc => "nt" ,
651
+ Self :: Aarch64PcWindowsMsvc => "nt" ,
640
652
Self :: Linux | Self :: X8664UnknownLinuxGnu => "posix" ,
641
653
Self :: Macos | Self :: Aarch64AppleDarwin => "posix" ,
642
654
Self :: I686PcWindowsMsvc => "nt" ,
@@ -678,6 +690,7 @@ impl TargetTriple {
678
690
pub fn sys_platform ( self ) -> & ' static str {
679
691
match self {
680
692
Self :: Windows | Self :: X8664PcWindowsMsvc => "win32" ,
693
+ Self :: Aarch64PcWindowsMsvc => "win32" ,
681
694
Self :: Linux | Self :: X8664UnknownLinuxGnu => "linux" ,
682
695
Self :: Macos | Self :: Aarch64AppleDarwin => "darwin" ,
683
696
Self :: I686PcWindowsMsvc => "win32" ,
@@ -719,6 +732,7 @@ impl TargetTriple {
719
732
pub fn manylinux_compatible ( self ) -> bool {
720
733
match self {
721
734
Self :: Windows | Self :: X8664PcWindowsMsvc => false ,
735
+ Self :: Aarch64PcWindowsMsvc => false ,
722
736
Self :: Linux | Self :: X8664UnknownLinuxGnu => true ,
723
737
Self :: Macos | Self :: Aarch64AppleDarwin => false ,
724
738
Self :: I686PcWindowsMsvc => false ,
0 commit comments