about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStypox <stypox@pm.me>2025-07-13 08:46:49 +0200
committerStypox <stypox@pm.me>2025-07-14 09:37:24 +0200
commitb3ed03529fe7c846c6a7e6ef7382439a0ce4247e (patch)
tree719d196d20eb1c1f2f73ed5ef37bae948364e14f
parent937ef9381c45e9cad5fc31bdc85224b7f6e13df1 (diff)
downloadrust-b3ed03529fe7c846c6a7e6ef7382439a0ce4247e.tar.gz
rust-b3ed03529fe7c846c6a7e6ef7382439a0ce4247e.zip
Only compare tool name to apply features to
-rw-r--r--src/bootstrap/src/core/build_steps/tool.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs
index e3a0ab212a3..8271be1675f 100644
--- a/src/bootstrap/src/core/build_steps/tool.rs
+++ b/src/bootstrap/src/core/build_steps/tool.rs
@@ -9,6 +9,7 @@
 //! Each Rust tool **MUST** utilize `ToolBuild` inside their `Step` logic,
 //! return `ToolBuildResult` and should never prepare `cargo` invocations manually.
 
+use std::ffi::OsStr;
 use std::path::PathBuf;
 use std::{env, fs};
 
@@ -258,7 +259,7 @@ pub fn prepare_tool_cargo(
         .config
         .tool
         .iter()
-        .filter(|(tool_name, _)| path.ends_with(tool_name))
+        .filter(|(tool_name, _)| path.file_name().and_then(OsStr::to_str) == Some(tool_name))
         .for_each(|(_, tool)| features.extend(tool.features.clone().unwrap_or_default()));
 
     // clippy tests need to know about the stage sysroot. Set them consistently while building to