diff options
author | Jorge Aparicio <japaricious@gmail.com> | 2016-01-16 10:50:40 -0500 |
---|---|---|
committer | Jorge Aparicio <japaricious@gmail.com> | 2016-01-16 10:50:40 -0500 |
commit | a52a3abdc420f3fdacf1a4fea38e6e0ccee3596d (patch) | |
tree | cbaa7494b209c7b380576c7abd46bfbb5c6d8096 | |
parent | 3d2f57cabe8fbb9ce098e04b55450d9a52d92946 (diff) |
make get_clang_dir more robust
Similar to #242. In my system, clang is a symlink to a versioned clang (e.g.
clang-3.7), and this equality check to "clang" was failing.
This patch makes the check more robust so it can match "clang" or "clang-3.7",
but still reject a symlink to ccache.
-rw-r--r-- | src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -275,7 +275,7 @@ fn get_clang_dir() -> Option<path::PathBuf>{ .file_name() .and_then(|f| f.to_str()) .iter() - .any(|&f| f == "clang") { + .any(|&f| f.starts_with("clang")) { if let Some(dir) = real_path.parent() { return Some(dir.to_path_buf()) } |