Skip to content

Commit 23518f7

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

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

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

Lines changed: 12 additions & 6 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
}
@@ -1688,7 +1690,11 @@ impl Step for Extended {
16881690

16891691
let prepare = |name: &str| {
16901692
builder.create_dir(&exe.join(name));
1691-
let dir = if name == "rust-std" || name == "rust-analysis" {
1693+
let dir = if name == "rust-std"
1694+
|| name == "rust-analysis"
1695+
|| name == "rust-docs"
1696+
|| name == "rust-json-docs"
1697+
{
16921698
format!("{}-{}", name, target.triple)
16931699
} else if name == "rust-analyzer" {
16941700
"rust-analyzer-preview".to_string()

src/tools/linkchecker/linkcheck.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323

2424
set -e
2525

26-
html_dir="$(rustc +nightly --print sysroot)/share/doc/rust/html"
26+
# Only check host docs now
27+
host_triple=$(rustc +nightly --print host-tuple)
28+
html_dir="$(rustc +nightly --print sysroot)/share/doc/rust/html/$host_triple"
2729

2830
if [ ! -d "$html_dir" ]
2931
then

src/tools/miri/ci/build-all-targets.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FAILS_DIR=failures
99
rm -rf $FAILS_DIR
1010
mkdir $FAILS_DIR
1111

12-
PLATFORM_SUPPORT_FILE=$(rustc +miri --print sysroot)/share/doc/rust/html/rustc/platform-support.html
12+
PLATFORM_SUPPORT_FILE=$(rustc +miri --print sysroot)/share/doc/rust/html/$(rustc +miri --print host-tuple)/rustc/platform-support.html
1313

1414
for target in $(python3 ci/scrape-targets.py $PLATFORM_SUPPORT_FILE); do
1515
# Wipe the cache before every build to minimize disk usage

0 commit comments

Comments
 (0)