File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -704,6 +704,10 @@ fn rust_to_clang_target(rust_target: &str) -> Box<str> {
704
704
let idx = clang_target. rfind ( '-' ) . expect ( TRIPLE_HYPHENS_MESSAGE ) ;
705
705
706
706
clang_target. replace_range ( ( idx + 1 ) .., "elf" ) ;
707
+ } else if clang_target. ends_with ( "apple-ios-sim" ) {
708
+ let idx = clang_target. rfind ( '-' ) . expect ( TRIPLE_HYPHENS_MESSAGE ) ;
709
+
710
+ clang_target. replace_range ( ( idx + 1 ) .., "simulator" ) ;
707
711
}
708
712
709
713
clang_target. into ( )
@@ -1389,3 +1393,11 @@ fn test_rust_to_clang_target_espidf() {
1389
1393
"xtensa-esp32-elf"
1390
1394
) ;
1391
1395
}
1396
+
1397
+ #[ test]
1398
+ fn test_rust_to_clang_target_simulator ( ) {
1399
+ assert_eq ! (
1400
+ rust_to_clang_target( "aarch64-apple-ios-sim" ) . as_ref( ) ,
1401
+ "arm64-apple-ios-simulator"
1402
+ ) ;
1403
+ }
You can’t perform that action at this time.
0 commit comments