Skip to content

Commit

Permalink
better clan target matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenehp committed Jun 8, 2024
1 parent 1d16260 commit 17eaa7c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,12 @@ fn build(sdk_path: Option<&str>, target: &str) {
// See https://github.com/rust-lang/rust-bindgen/issues/1211
// Technically according to the llvm mailing list, the argument to clang here should be
// -arch arm64 but it looks cleaner to just change the target.
let clang_target = if target.starts_with("aarch64-apple-ios") {
"arm64-apple-ios"
} else if target.starts_with("aarch64-apple-visionos") {
"arm64-apple-xros"
} else if target.starts_with("aarch64-apple-darwin") {
"arm64-apple-darwin"
} else {
target
let clang_target = match target {
"aarch64-apple-ios" => "arm64-apple-ios",
"aarch64-apple-visionos" => "arm64-apple-xros",
"aarch64-apple-visionos-sim" => "arm64-apple-xros-sim",
"aarch64-apple-darwin" => "arm64-apple-darwin",
_ => target
};
builder = builder.size_t_is_usize(true);

Expand Down

0 comments on commit 17eaa7c

Please sign in to comment.