Skip to content

Commit e5480dd

Browse files
HackerFooemilio
authored andcommitted
rename *-apple-ios-sim to ...simulator
1 parent 19c1f60 commit e5480dd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

bindgen/lib.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
}

0 commit comments

Comments
 (0)