Skip to content

Commit 2e89bf7

Browse files
committed
bootstrap: Ensure host documentation is built before tarball is created
`run_default_doc_steps()` is called to ensure the documentation is built by `Docs::run()` and it should build the documentation if it isn't already built. When running the `install src` command I'm seeing failures as the `builder.doc_out(host)` directory does not exist. This is because `match_paths_to_steps_and_run()` doesn't actually build any documentation as the `paths.is_empty()` causes an early return. This results in install failures as the `*/doc` src directory doesn't exist. This patch passes the paths to `run_host_step_descriptions()` when building documentation to ensure it is correctly built. This fixes installing the Rust source code in OpenEmbedded. Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
1 parent 4586feb commit 2e89bf7

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/bootstrap/src/core/build_steps/dist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl Step for Docs {
8383
// FIXME: explicitly enumerate the steps that should be executed here, and gather their
8484
// documentation, rather than running all default steps and then read their output
8585
// from a shared directory.
86-
builder.run_default_doc_steps();
86+
builder.run_host_default_doc_steps();
8787

8888
let dest = "share/doc/rust/html";
8989

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,11 @@ impl<'a> Builder<'a> {
11171117
self.run_step_descriptions(&Builder::get_step_descriptions(self.kind), &self.paths);
11181118
}
11191119

1120+
/// Run all default documentation steps to build documentation.
1121+
pub fn run_host_default_doc_steps(&self) {
1122+
self.run_step_descriptions(&Builder::get_step_descriptions(Kind::Doc), &self.paths);
1123+
}
1124+
11201125
/// Run all default documentation steps to build documentation.
11211126
pub fn run_default_doc_steps(&self) {
11221127
self.run_step_descriptions(&Builder::get_step_descriptions(Kind::Doc), &[]);

0 commit comments

Comments
 (0)