From 430b0554f8974c039a64fd4f6e646be75cdb85ca Mon Sep 17 00:00:00 2001 From: Haibo Huang Date: Thu, 19 Nov 2020 06:58:19 -0800 Subject: Upgrade rust/crates/clang-sys to 1.0.3 Test: make Change-Id: I5a25215c9f2f7089bf7ac9ba318e81dd82051654 --- .cargo_vcs_info.json | 2 +- CHANGELOG.md | 5 +++++ Cargo.toml | 2 +- Cargo.toml.orig | 2 +- METADATA | 6 +++--- src/support.rs | 8 ++++++-- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index a6a7b1b..f643705 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "a5f2b5fef678dd436d16750922f59b2146c9b055" + "sha1": "b11a95758757bc1163cd06a32c94709d2cbae92d" } } diff --git a/CHANGELOG.md b/CHANGELOG.md index a114fb6..8b67c3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.0.3] - 2020-11-19 + +### Fixed +- Fixed `Clang::find` panicking when `llvm-config` or `xcode-build` don't output anything to `stdout` + ## [1.0.2] - 2020-11-17 ### Fixed diff --git a/Cargo.toml b/Cargo.toml index 895d93f..3f1b777 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ [package] name = "clang-sys" -version = "1.0.2" +version = "1.0.3" authors = ["Kyle Mayes "] build = "build.rs" links = "clang" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 2986183..a6dcb14 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -3,7 +3,7 @@ name = "clang-sys" authors = ["Kyle Mayes "] -version = "1.0.2" +version = "1.0.3" readme = "README.md" license = "Apache-2.0" diff --git a/METADATA b/METADATA index ad5f1e4..8e336ed 100644 --- a/METADATA +++ b/METADATA @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/clang-sys/clang-sys-1.0.2.crate" + value: "https://static.crates.io/crates/clang-sys/clang-sys-1.0.3.crate" } - version: "1.0.2" + version: "1.0.3" license_type: NOTICE last_upgrade_date { year: 2020 month: 11 - day: 17 + day: 19 } } diff --git a/src/support.rs b/src/support.rs index 2441487..8422f59 100644 --- a/src/support.rs +++ b/src/support.rs @@ -84,11 +84,15 @@ impl Clang { paths.push(path.into()); } if let Ok(path) = run_llvm_config(&["--bindir"]) { - paths.push(path.lines().next().unwrap().into()); + if let Some(line) = path.lines().next() { + paths.push(line.into()); + } } if cfg!(target_os = "macos") { if let Ok((path, _)) = run("xcodebuild", &["-find", "clang"]) { - paths.push(path.lines().next().unwrap().into()); + if let Some(line) = path.lines().next() { + paths.push(line.into()); + } } } paths.extend(env::split_paths(&env::var("PATH").unwrap())); -- cgit v1.2.3