File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2212,7 +2212,7 @@ impl Build {
22122212 }
22132213 } else if is_sim {
22142214 match arch {
2215- "arm64" | "aarch64" => ArchSpec :: Simulator ( "-arch arm64" ) ,
2215+ "arm64" | "aarch64" => ArchSpec :: Simulator ( "arm64" ) ,
22162216 "x86_64" => ArchSpec :: Simulator ( "-m64" ) ,
22172217 _ => {
22182218 return Err ( Error :: new (
@@ -2262,7 +2262,13 @@ impl Build {
22622262 format ! ( "{}os" , sdk_prefix)
22632263 }
22642264 ArchSpec :: Simulator ( arch) => {
2265- cmd. args . push ( arch. into ( ) ) ;
2265+ if arch. starts_with ( '-' ) {
2266+ // -m32 or -m64
2267+ cmd. args . push ( arch. into ( ) ) ;
2268+ } else {
2269+ cmd. args . push ( "-arch" . into ( ) ) ;
2270+ cmd. args . push ( arch. into ( ) ) ;
2271+ }
22662272 cmd. args
22672273 . push ( format ! ( "-m{}simulator-version-min={}" , sim_prefix, min_version) . into ( ) ) ;
22682274 format ! ( "{}simulator" , sdk_prefix)
You can’t perform that action at this time.
0 commit comments