@@ -19,6 +19,7 @@ pub enum Arch {
1919 I386 ,
2020 I686 ,
2121 X86_64 ,
22+ X86_64h ,
2223 X86_64_sim ,
2324 X86_64_macabi ,
2425 Arm64_macabi ,
@@ -36,6 +37,7 @@ impl Arch {
3637 I386 => "i386" ,
3738 I686 => "i686" ,
3839 X86_64 | X86_64_sim | X86_64_macabi => "x86_64" ,
40+ X86_64h => "x86_64h" ,
3941 }
4042 }
4143
@@ -44,13 +46,13 @@ impl Arch {
4446 Armv7 | Armv7k | Armv7s => "arm" ,
4547 Arm64 | Arm64_32 | Arm64_macabi | Arm64_sim => "aarch64" ,
4648 I386 | I686 => "x86" ,
47- X86_64 | X86_64_sim | X86_64_macabi => "x86_64" ,
49+ X86_64 | X86_64_sim | X86_64_macabi | X86_64h => "x86_64" ,
4850 } )
4951 }
5052
5153 fn target_abi ( self ) -> & ' static str {
5254 match self {
53- Armv7 | Armv7k | Armv7s | Arm64 | Arm64_32 | I386 | I686 | X86_64 => "" ,
55+ Armv7 | Armv7k | Armv7s | Arm64 | Arm64_32 | I386 | I686 | X86_64 | X86_64h => "" ,
5456 X86_64_macabi | Arm64_macabi => "macabi" ,
5557 // x86_64-apple-ios is a simulator target, even though it isn't
5658 // declared that way in the target like the other ones...
@@ -67,6 +69,10 @@ impl Arch {
6769 Arm64_32 => "apple-s4" ,
6870 I386 | I686 => "yonah" ,
6971 X86_64 | X86_64_sim => "core2" ,
72+ // Note: `core-avx2` is slightly more advanced than `x86_64h`, see
73+ // comments (and disabled features) in `x86_64h_apple_darwin` for
74+ // details.
75+ X86_64h => "core-avx2" ,
7076 X86_64_macabi => "core2" ,
7177 Arm64_macabi => "apple-a12" ,
7278 Arm64_sim => "apple-a12" ,
@@ -182,8 +188,13 @@ fn deployment_target(var_name: &str) -> Option<(u32, u32)> {
182188}
183189
184190fn macos_default_deployment_target ( arch : Arch ) -> ( u32 , u32 ) {
185- // Note: Arm64_sim is not included since macOS has no simulator.
186- if matches ! ( arch, Arm64 | Arm64_macabi ) { ( 11 , 0 ) } else { ( 10 , 7 ) }
191+ match arch {
192+ // Note: Arm64_sim is not included since macOS has no simulator.
193+ Arm64 | Arm64_macabi => ( 11 , 0 ) ,
194+ // x86_64h-apple-darwin only supports macOS 10.8 and later
195+ X86_64h => ( 10 , 8 ) ,
196+ _ => ( 10 , 7 ) ,
197+ }
187198}
188199
189200fn macos_deployment_target ( arch : Arch ) -> ( u32 , u32 ) {
@@ -227,7 +238,7 @@ fn link_env_remove(arch: Arch, os: &'static str) -> StaticCow<[StaticCow<str>]>
227238 // of the linking environment that's wrong and reversed.
228239 match arch {
229240 Armv7 | Armv7k | Armv7s | Arm64 | Arm64_32 | I386 | I686 | X86_64 | X86_64_sim
230- | Arm64_sim => {
241+ | X86_64h | Arm64_sim => {
231242 cvs ! [ "MACOSX_DEPLOYMENT_TARGET" ]
232243 }
233244 X86_64_macabi | Arm64_macabi => cvs ! [ "IPHONEOS_DEPLOYMENT_TARGET" ] ,
0 commit comments