Skip to content

Commit 48d4435

Browse files
Build rustc for the host as well as target in tools
1 parent 084beb8 commit 48d4435

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/bootstrap/builder/tests.rs

+4
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ fn dist_only_cross_host() {
185185
compiler: Compiler { host: a, stage: 0 },
186186
target: a,
187187
},
188+
compile::Rustc {
189+
compiler: Compiler { host: a, stage: 1 },
190+
target: a,
191+
},
188192
compile::Rustc {
189193
compiler: Compiler { host: a, stage: 1 },
190194
target: b,

src/bootstrap/tool.rs

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ impl Step for ToolBuild {
5454

5555
match self.mode {
5656
Mode::ToolRustc => {
57+
// e.g. clippy wants to depend on compiler internals from
58+
// the host, too -- this seems to be because we run rustc w/o the target flag, which
59+
// is probably because clippy is a "plugin" so is intended for the host.
60+
builder.ensure(compile::Rustc { compiler, target: compiler.host });
5761
builder.ensure(compile::Rustc { compiler, target })
5862
}
5963
Mode::ToolStd => {

0 commit comments

Comments
 (0)