Skip to content

Commit 3c6cf7e

Browse files
Build rustdoc for cross-compiled targets
This isn't an issue for most folks who use x.py dist, which will directly depend on this. But for x.py build, if we don't properly set target here rustdoc will not be built. Currently, there is not a default-on step for generating a rustc for a given target either, so we will fail to build a rustc as well.
1 parent 67a5112 commit 3c6cf7e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bootstrap/tool.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,11 @@ impl Step for Rustdoc {
471471

472472
fn make_run(run: RunConfig<'_>) {
473473
run.builder.ensure(Rustdoc {
474-
compiler: run.builder.compiler(run.builder.top_stage, run.build_triple()),
474+
// Note: this is somewhat unique in that we actually want a *target*
475+
// compiler here, because rustdoc *is* a compiler. We won't be using
476+
// this as the compiler to build with, but rather this is "what
477+
// compiler are we producing"?
478+
compiler: run.builder.compiler(run.builder.top_stage, run.target),
475479
});
476480
}
477481

0 commit comments

Comments
 (0)