Skip to content

Commit 0ae076e

Browse files
committed
Pass --bin flags to specify the tool binary name
1 parent 6c1b220 commit 0ae076e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/tool.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl Step for ToolBuild {
6363
_ => panic!("unexpected Mode for tool build")
6464
}
6565

66-
let cargo = prepare_tool_cargo(
66+
let mut cargo = prepare_tool_cargo(
6767
builder,
6868
compiler,
6969
self.mode,
@@ -74,6 +74,11 @@ impl Step for ToolBuild {
7474
&self.extra_features,
7575
);
7676

77+
// Pass the --bin flags to tell Cargo that is should only build the tool binaries.
78+
// If not, Cargo will build everything by default, including the deprecated clippy plugin
79+
// that causes failure on cross-compiled platforms.
80+
cargo.arg("--bin").arg(&tool);
81+
7782
builder.info(&format!("Building stage{} tool {} ({})", compiler.stage, tool, target));
7883
let mut duplicates = Vec::new();
7984
let is_expected = compile::stream_cargo(builder, cargo, vec![], &mut |msg| {

0 commit comments

Comments
 (0)