@@ -2075,19 +2075,14 @@ impl Build {
2075
2075
. push ( format ! ( "--target={}-apple-ios-macabi" , arch) . into ( ) ) ;
2076
2076
} else if target. os == "ios" && target. abi == "sim" {
2077
2077
let arch = map_darwin_target_from_rust_to_compiler_architecture ( target) ;
2078
- let sdk_details = apple_os_sdk_parts ( "ios" , & AppleArchSpec :: Simulator ( "" ) ) ;
2079
- let deployment_target =
2080
- self . apple_deployment_version ( target, & sdk_details. sdk ) ;
2078
+ let deployment_target = self . apple_deployment_target ( target) ;
2081
2079
cmd. args . push (
2082
2080
format ! ( "--target={}-apple-ios{}-simulator" , arch, deployment_target)
2083
2081
. into ( ) ,
2084
2082
) ;
2085
2083
} else if target. os == "watchos" && target. abi == "sim" {
2086
2084
let arch = map_darwin_target_from_rust_to_compiler_architecture ( target) ;
2087
- let sdk_details =
2088
- apple_os_sdk_parts ( "watchos" , & AppleArchSpec :: Simulator ( "" ) ) ;
2089
- let deployment_target =
2090
- self . apple_deployment_version ( target, & sdk_details. sdk ) ;
2085
+ let deployment_target = self . apple_deployment_target ( target) ;
2091
2086
cmd. args . push (
2092
2087
format ! (
2093
2088
"--target={}-apple-watchos{}-simulator" ,
@@ -2097,9 +2092,7 @@ impl Build {
2097
2092
) ;
2098
2093
} else if target. os == "tvos" && target. abi == "sim" {
2099
2094
let arch = map_darwin_target_from_rust_to_compiler_architecture ( target) ;
2100
- let sdk_details = apple_os_sdk_parts ( "tvos" , & AppleArchSpec :: Simulator ( "" ) ) ;
2101
- let deployment_target =
2102
- self . apple_deployment_version ( target, & sdk_details. sdk ) ;
2095
+ let deployment_target = self . apple_deployment_target ( target) ;
2103
2096
cmd. args . push (
2104
2097
format ! (
2105
2098
"--target={}-apple-tvos{}-simulator" ,
@@ -2109,18 +2102,13 @@ impl Build {
2109
2102
) ;
2110
2103
} else if target. os == "tvos" {
2111
2104
let arch = map_darwin_target_from_rust_to_compiler_architecture ( target) ;
2112
- let sdk_details = apple_os_sdk_parts ( "tvos" , & AppleArchSpec :: Device ( "" ) ) ;
2113
- let deployment_target =
2114
- self . apple_deployment_version ( target, & sdk_details. sdk ) ;
2105
+ let deployment_target = self . apple_deployment_target ( target) ;
2115
2106
cmd. args . push (
2116
2107
format ! ( "--target={}-apple-tvos{}" , arch, deployment_target) . into ( ) ,
2117
2108
) ;
2118
2109
} else if target. os == "visionos" && target. abi == "sim" {
2119
2110
let arch = map_darwin_target_from_rust_to_compiler_architecture ( target) ;
2120
- let sdk_details =
2121
- apple_os_sdk_parts ( "visionos" , & AppleArchSpec :: Simulator ( "" ) ) ;
2122
- let deployment_target =
2123
- self . apple_deployment_version ( target, & sdk_details. sdk ) ;
2111
+ let deployment_target = self . apple_deployment_target ( target) ;
2124
2112
cmd. args . push (
2125
2113
format ! (
2126
2114
"--target={}-apple-xros{}-simulator" ,
@@ -2130,10 +2118,7 @@ impl Build {
2130
2118
) ;
2131
2119
} else if target. os == "visionos" {
2132
2120
let arch = map_darwin_target_from_rust_to_compiler_architecture ( target) ;
2133
- let sdk_details =
2134
- apple_os_sdk_parts ( "visionos" , & AppleArchSpec :: Device ( "" ) ) ;
2135
- let deployment_target =
2136
- self . apple_deployment_version ( target, & sdk_details. sdk ) ;
2121
+ let deployment_target = self . apple_deployment_target ( target) ;
2137
2122
cmd. args . push (
2138
2123
format ! ( "--target={}-apple-xros{}" , arch, deployment_target) . into ( ) ,
2139
2124
) ;
@@ -2675,7 +2660,7 @@ impl Build {
2675
2660
} ;
2676
2661
2677
2662
let sdk_details = apple_os_sdk_parts ( & target. os , & arch) ;
2678
- let min_version = self . apple_deployment_version ( & target, & sdk_details . sdk ) ;
2663
+ let min_version = self . apple_deployment_target ( & target) ;
2679
2664
2680
2665
match arch {
2681
2666
AppleArchSpec :: Device ( _) if target. os == "macos" => {
@@ -3818,7 +3803,8 @@ impl Build {
3818
3803
Ok ( sdk_path)
3819
3804
}
3820
3805
3821
- fn apple_deployment_version ( & self , target : & TargetInfo , sdk : & str ) -> Arc < str > {
3806
+ fn apple_deployment_target ( & self , target : & TargetInfo ) -> Arc < str > {
3807
+ let sdk = target. apple_sdk_name ( ) ;
3822
3808
if let Some ( ret) = self
3823
3809
. apple_versions_cache
3824
3810
. read ( )
0 commit comments