Skip to content

Commit e90c054

Browse files
committed
Support aarch64-apple-ios-sim
1 parent 6eae3f5 commit e90c054

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

gdnative-sys/build.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ mod header_binding {
2323
let target = std::env::var("TARGET").unwrap();
2424
let platform = if target.contains("apple-darwin") {
2525
"macosx"
26-
} else if target == "x86_64-apple-ios" {
26+
} else if target == "x86_64-apple-ios" || target == "aarch64-apple-ios-sim" {
2727
"iphonesimulator"
2828
} else if target == "aarch64-apple-ios" {
2929
"iphoneos"
@@ -214,7 +214,11 @@ mod header_binding {
214214
// Workaround for https://github.com/rust-lang/rust-bindgen/issues/1211: manually set
215215
// target triple to `arm64-apple-ios` in place of `aarch64-apple-ios`.
216216
if target_arch == "aarch64" && target_os == "ios" {
217-
builder = builder.clang_arg("--target=arm64-apple-ios");
217+
if target_env == "sim" {
218+
builder = builder.clang_arg("--target=arm64-apple-ios-sim");
219+
} else {
220+
builder = builder.clang_arg("--target=arm64-apple-ios");
221+
}
218222
}
219223

220224
// Workaround: Microsoft extensions aren't enabled by default for the `gnu` toolchain

0 commit comments

Comments
 (0)