Skip to content

Commit

Permalink
Update bindgen build dependency to 0.50
Browse files Browse the repository at this point in the history
As of 0.49, bindgen supports a BINDGEN_EXTRA_CLANG_ARGS environment variable
that can be used to pass extra arguments to clang. This can be used
instead of COREAUDIO_CFLAGS.
  • Loading branch information
glandium committed Jul 26, 2019
1 parent dec2568 commit d6470b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/RustAudio/coreaudio-sys.git"
build = "build.rs"

[build-dependencies]
bindgen = "0.42"
bindgen = "0.50"

[features]
default = ["audio_toolbox", "audio_unit", "core_audio", "open_al", "core_midi"]
Expand Down
6 changes: 1 addition & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ fn build(sdk_path: &str, target: &str) {
}
}

println!("cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS");
// Get the cargo out directory.
let out_dir = PathBuf::from(env::var("OUT_DIR").expect("env variable OUT_DIR not found"));

Expand All @@ -94,11 +95,6 @@ fn build(sdk_path: &str, target: &str) {
.derive_default(true)
.rustfmt_bindings(false);

println!("cargo:rerun-if-env-changed=COREAUDIO_CFLAGS");
if let Ok(cflags) = std::env::var("COREAUDIO_CFLAGS") {
builder = builder.clang_args(cflags.split(" "));
}

let bindings = builder.generate().expect("unable to generate bindings");

// Write them to the crate root.
Expand Down

0 comments on commit d6470b1

Please sign in to comment.