Skip to content

Commit b3ed035

Browse files
committed
Only compare tool name to apply features to
1 parent 937ef93 commit b3ed035

File tree

1 file changed

+2
-1
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+2
-1
lines changed

src/bootstrap/src/core/build_steps/tool.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
//! Each Rust tool **MUST** utilize `ToolBuild` inside their `Step` logic,
1010
//! return `ToolBuildResult` and should never prepare `cargo` invocations manually.
1111
12+
use std::ffi::OsStr;
1213
use std::path::PathBuf;
1314
use std::{env, fs};
1415

@@ -258,7 +259,7 @@ pub fn prepare_tool_cargo(
258259
.config
259260
.tool
260261
.iter()
261-
.filter(|(tool_name, _)| path.ends_with(tool_name))
262+
.filter(|(tool_name, _)| path.file_name().and_then(OsStr::to_str) == Some(tool_name))
262263
.for_each(|(_, tool)| features.extend(tool.features.clone().unwrap_or_default()));
263264

264265
// clippy tests need to know about the stage sysroot. Set them consistently while building to

0 commit comments

Comments
 (0)