Skip to content

Commit e26974c

Browse files
committed
bootstrap: minimal fix for ./x install src with build.docs = false
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 ensures that the builder.doc_out(host) directory exists. This fixes installing the Rust source when `build.docs = false`. This fixes installing the Rust source code in OpenEmbedded. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Jieyou Xu <jieyouxu@outlook.com>
1 parent b55e20a commit e26974c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • src/bootstrap/src/core/build_steps

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)