diff --git a/src/lib.rs b/src/lib.rs index 399a7aac0..ed2fb65ba 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2948,7 +2948,12 @@ impl Build { /// Returns compiler path, optional modifier name from whitelist, and arguments vec fn env_tool(&self, name: &str) -> Option<(PathBuf, Option, Vec)> { let tool = match self.getenv_with_target_prefixes(name) { - Ok(tool) => tool, + Ok(tool) => { + if tool.is_empty() { + return None; + } + tool + } Err(_) => return None, };