Skip to content

Commit a3fe394

Browse files
committed
ensure existence of the tool crate dir before linking
Signed-off-by: onur-ozkan <[email protected]>
1 parent a348b00 commit a3fe394

File tree

1 file changed

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

1 file changed

+9
-6
lines changed

src/bootstrap/src/core/build_steps/doc.rs

+9-6
Original file line numberDiff line numberDiff line change
@@ -829,13 +829,16 @@ macro_rules! tool_doc {
829829
builder.stage_out(compiler, Mode::ToolRustc).join("doc"),
830830
];
831831

832-
$(for krate in $crates {
833-
let dir_name = krate.replace("-", "_");
834-
t!(fs::create_dir_all(&out.join(dir_name)));
835-
})?
832+
if !builder.config.dry_run() {
833+
for out_dir in &out_dirs {
834+
t!(fs::create_dir_all(&out_dir));
835+
symlink_dir_force(&builder.config, &out, &out_dir);
836+
}
836837

837-
for out_dir in out_dirs {
838-
symlink_dir_force(&builder.config, &out, &out_dir);
838+
$(for krate in $crates {
839+
let dir_name = krate.replace("-", "_");
840+
t!(fs::create_dir_all(out_dirs[0].join(&*dir_name)));
841+
})?
839842
}
840843

841844
// Build cargo command.

0 commit comments

Comments
 (0)