We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 937ef93 commit b3ed035Copy full SHA for b3ed035
src/bootstrap/src/core/build_steps/tool.rs
@@ -9,6 +9,7 @@
9
//! Each Rust tool **MUST** utilize `ToolBuild` inside their `Step` logic,
10
//! return `ToolBuildResult` and should never prepare `cargo` invocations manually.
11
12
+use std::ffi::OsStr;
13
use std::path::PathBuf;
14
use std::{env, fs};
15
@@ -258,7 +259,7 @@ pub fn prepare_tool_cargo(
258
259
.config
260
.tool
261
.iter()
- .filter(|(tool_name, _)| path.ends_with(tool_name))
262
+ .filter(|(tool_name, _)| path.file_name().and_then(OsStr::to_str) == Some(tool_name))
263
.for_each(|(_, tool)| features.extend(tool.features.clone().unwrap_or_default()));
264
265
// clippy tests need to know about the stage sysroot. Set them consistently while building to
0 commit comments