Skip to content

Commit 6efcfc4

Browse files
Rollup merge of rust-lang#150845 - alistair23:alistair/doc-build-fixup, r=jieyouxu
bootstrap: minimal fix for ./x install src with build.docs = false `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_step_descriptions()` when building documentation to ensure it is correctly built. This fixes installing the Rust source code in OpenEmbedded.
2 parents e1f6d14 + e26974c commit 6efcfc4

File tree

1 file changed

+6
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ impl Step for Docs {
8787
// from a shared directory.
8888
builder.run_default_doc_steps();
8989

90+
// In case no default doc steps are run for host, it is possible that `<host>/doc` directory
91+
// is never created.
92+
if !builder.config.dry_run() {
93+
t!(fs::create_dir_all(builder.doc_out(host)));
94+
}
95+
9096
let dest = "share/doc/rust/html";
9197

9298
let mut tarball = Tarball::new(builder, "rust-docs", &host.triple);

0 commit comments

Comments
 (0)