@@ -2075,19 +2075,14 @@ impl Build {
20752075 . push ( format ! ( "--target={}-apple-ios-macabi" , arch) . into ( ) ) ;
20762076 } else if target. os == "ios" && target. abi == "sim" {
20772077 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) ;
20812079 cmd. args . push (
20822080 format ! ( "--target={}-apple-ios{}-simulator" , arch, deployment_target)
20832081 . into ( ) ,
20842082 ) ;
20852083 } else if target. os == "watchos" && target. abi == "sim" {
20862084 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) ;
20912086 cmd. args . push (
20922087 format ! (
20932088 "--target={}-apple-watchos{}-simulator" ,
@@ -2097,9 +2092,7 @@ impl Build {
20972092 ) ;
20982093 } else if target. os == "tvos" && target. abi == "sim" {
20992094 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) ;
21032096 cmd. args . push (
21042097 format ! (
21052098 "--target={}-apple-tvos{}-simulator" ,
@@ -2109,18 +2102,13 @@ impl Build {
21092102 ) ;
21102103 } else if target. os == "tvos" {
21112104 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) ;
21152106 cmd. args . push (
21162107 format ! ( "--target={}-apple-tvos{}" , arch, deployment_target) . into ( ) ,
21172108 ) ;
21182109 } else if target. os == "visionos" && target. abi == "sim" {
21192110 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) ;
21242112 cmd. args . push (
21252113 format ! (
21262114 "--target={}-apple-xros{}-simulator" ,
@@ -2130,10 +2118,7 @@ impl Build {
21302118 ) ;
21312119 } else if target. os == "visionos" {
21322120 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) ;
21372122 cmd. args . push (
21382123 format ! ( "--target={}-apple-xros{}" , arch, deployment_target) . into ( ) ,
21392124 ) ;
@@ -2675,7 +2660,7 @@ impl Build {
26752660 } ;
26762661
26772662 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) ;
26792664
26802665 match arch {
26812666 AppleArchSpec :: Device ( _) if target. os == "macos" => {
@@ -3818,7 +3803,8 @@ impl Build {
38183803 Ok ( sdk_path)
38193804 }
38203805
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 ( ) ;
38223808 if let Some ( ret) = self
38233809 . apple_versions_cache
38243810 . read ( )
0 commit comments