Skip to content

remove target override for bindgen because it isn't necessary #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,20 +120,8 @@ fn build(sdk_path: Option<&str>, target: &str) {
// Begin building the bindgen params.
let mut builder = bindgen::Builder::default();

// 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 target = if target == "aarch64-apple-ios" {
"arm64-apple-ios"
} else if target == "aarch64-apple-darwin" {
"arm64-apple-darwin"
} else {
target
};
builder = builder.size_t_is_usize(true);

builder = builder.clang_args(&[&format!("--target={}", target)]);

if let Some(sdk_path) = sdk_path {
builder = builder.clang_args(&["-isysroot", sdk_path]);
}
Expand Down