From 1c06674eb04441cd2eb37598c98ab03910e90069 Mon Sep 17 00:00:00 2001 From: finch Date: Wed, 16 Apr 2025 18:59:27 -0400 Subject: [PATCH] Remap iOS simulator targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds additional logic to the `build.rs` script which handles the mismatch between the `-sim` and `-simulator` suffixes — Rust uses the former, and Clang expects the latter. --- build.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.rs b/build.rs index f3373cd..1c70f6e 100644 --- a/build.rs +++ b/build.rs @@ -14,6 +14,7 @@ fn sdk_path(target: &str) -> Result { } else if target == "x86_64-apple-ios" || target == "i386-apple-ios" || target == "aarch64-apple-ios-sim" + || target == "x86_64-apple-ios-sim" { "iphonesimulator" } else if target == "aarch64-apple-ios" @@ -127,6 +128,10 @@ fn build(sdk_path: Option<&str>, target: &str) { "arm64-apple-ios" } else if target == "aarch64-apple-darwin" { "arm64-apple-darwin" + } else if target == "aarch64-apple-ios-sim" { + "arm64-apple-ios-simulator" + } else if target == "x86_64-apple-ios-sim" { + "x86_64-apple-ios-simulator" } else { target };