Skip to content

Commit 067a99b

Browse files
committed
install docs for each target in different directory
1 parent 8da6239 commit 067a99b

File tree

1 file changed

+7
-5
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+7
-5
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,13 @@ impl Step for Docs {
7676
let host = self.host;
7777
builder.default_doc(&[]);
7878

79-
let dest = "share/doc/rust/html";
79+
let dest = format!("share/doc/rust/html/{host}");
8080

8181
let mut tarball = Tarball::new(builder, "rust-docs", &host.triple);
82+
tarball.include_target_in_component_name(true);
8283
tarball.set_product_name("Rust Documentation");
83-
tarball.add_bulk_dir(builder.doc_out(host), dest);
84-
tarball.add_file(builder.src.join("src/doc/robots.txt"), dest, FileType::Regular);
84+
tarball.add_bulk_dir(builder.doc_out(host), &dest);
85+
tarball.add_file(builder.src.join("src/doc/robots.txt"), &dest, FileType::Regular);
8586
Some(tarball.generate())
8687
}
8788
}
@@ -113,12 +114,13 @@ impl Step for JsonDocs {
113114
DocumentationFormat::Json,
114115
));
115116

116-
let dest = "share/doc/rust/json";
117+
let dest = format!("share/doc/rust/json/{host}");
117118

118119
let mut tarball = Tarball::new(builder, "rust-docs-json", &host.triple);
120+
tarball.include_target_in_component_name(true);
119121
tarball.set_product_name("Rust Documentation In JSON Format");
120122
tarball.is_preview(true);
121-
tarball.add_bulk_dir(builder.json_doc_out(host), dest);
123+
tarball.add_bulk_dir(builder.json_doc_out(host), &dest);
122124
Some(tarball.generate())
123125
}
124126
}

0 commit comments

Comments
 (0)