Skip to content

Commit f677bab

Browse files
committed
add tool::Cargofmt binary to target sysroot
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 13f3bd1 commit f677bab

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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

+7-2
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,12 @@ fn run_tool_build_step(
11861186
}
11871187
}
11881188

1189-
tool_extended!(Cargofmt { path: "src/tools/rustfmt", tool_name: "cargo-fmt", stable: true });
1189+
tool_extended!(Cargofmt {
1190+
path: "src/tools/rustfmt",
1191+
tool_name: "cargo-fmt",
1192+
stable: true,
1193+
add_bins_to_sysroot: ["cargo-fmt"]
1194+
});
11901195
tool_extended!(CargoClippy {
11911196
path: "src/tools/clippy",
11921197
tool_name: "cargo-clippy",
@@ -1216,7 +1221,7 @@ tool_extended!(Rustfmt {
12161221
path: "src/tools/rustfmt",
12171222
tool_name: "rustfmt",
12181223
stable: true,
1219-
add_bins_to_sysroot: ["rustfmt", "cargo-fmt"]
1224+
add_bins_to_sysroot: ["rustfmt"]
12201225
});
12211226

12221227
#[derive(Debug, Clone, PartialEq, Eq, Hash)]

src/bootstrap/src/core/builder/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,7 @@ impl<'a> Builder<'a> {
890890
gcc::Gcc,
891891
llvm::Sanitizers,
892892
tool::Rustfmt,
893+
tool::Cargofmt,
893894
tool::Miri,
894895
tool::CargoMiri,
895896
llvm::Lld,

0 commit comments

Comments
 (0)