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> {
704704 let idx = clang_target. rfind ( '-' ) . expect ( TRIPLE_HYPHENS_MESSAGE ) ;
705705
706706 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" ) ;
707711 }
708712
709713 clang_target. into ( )
@@ -1389,3 +1393,11 @@ fn test_rust_to_clang_target_espidf() {
13891393 "xtensa-esp32-elf"
13901394 ) ;
13911395}
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