Skip to content

Commit

Permalink
ensure existence of the tool crate dir before linking
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Nov 5, 2023
1 parent a348b00 commit a3fe394
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/bootstrap/src/core/build_steps/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -829,13 +829,16 @@ macro_rules! tool_doc {
builder.stage_out(compiler, Mode::ToolRustc).join("doc"),
];

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

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

// Build cargo command.
Expand Down

0 comments on commit a3fe394

Please sign in to comment.