Skip to content

Commit d6470b1

Browse files
committedJul 26, 2019
Update bindgen build dependency to 0.50
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.
1 parent dec2568 commit d6470b1

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed
 

‎Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/RustAudio/coreaudio-sys.git"
1111
build = "build.rs"
1212

1313
[build-dependencies]
14-
bindgen = "0.42"
14+
bindgen = "0.50"
1515

1616
[features]
1717
default = ["audio_toolbox", "audio_unit", "core_audio", "open_al", "core_midi"]

‎build.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ fn build(sdk_path: &str, target: &str) {
7474
}
7575
}
7676

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

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

97-
println!("cargo:rerun-if-env-changed=COREAUDIO_CFLAGS");
98-
if let Ok(cflags) = std::env::var("COREAUDIO_CFLAGS") {
99-
builder = builder.clang_args(cflags.split(" "));
100-
}
101-
10298
let bindings = builder.generate().expect("unable to generate bindings");
10399

104100
// Write them to the crate root.

0 commit comments

Comments
 (0)
Please sign in to comment.