Skip to content

install docs for each target in different directory #142478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ impl Step for Docs {
let host = self.host;
builder.default_doc(&[]);

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

let mut tarball = Tarball::new(builder, "rust-docs", &host.triple);
tarball.include_target_in_component_name(true);
tarball.set_product_name("Rust Documentation");
tarball.add_bulk_dir(builder.doc_out(host), dest);
tarball.add_file(builder.src.join("src/doc/robots.txt"), dest, FileType::Regular);
tarball.add_bulk_dir(builder.doc_out(host), &dest);
tarball.add_file(builder.src.join("src/doc/robots.txt"), &dest, FileType::Regular);
Some(tarball.generate())
}
}
Expand Down Expand Up @@ -113,12 +114,13 @@ impl Step for JsonDocs {
DocumentationFormat::Json,
));

let dest = "share/doc/rust/json";
let dest = format!("share/doc/rust/json/{host}");

let mut tarball = Tarball::new(builder, "rust-docs-json", &host.triple);
tarball.include_target_in_component_name(true);
tarball.set_product_name("Rust Documentation In JSON Format");
tarball.is_preview(true);
tarball.add_bulk_dir(builder.json_doc_out(host), dest);
tarball.add_bulk_dir(builder.json_doc_out(host), &dest);
Some(tarball.generate())
}
}
Expand Down Expand Up @@ -1688,7 +1690,11 @@ impl Step for Extended {

let prepare = |name: &str| {
builder.create_dir(&exe.join(name));
let dir = if name == "rust-std" || name == "rust-analysis" {
let dir = if name == "rust-std"
|| name == "rust-analysis"
|| name == "rust-docs"
|| name == "rust-json-docs"
{
format!("{}-{}", name, target.triple)
} else if name == "rust-analyzer" {
"rust-analyzer-preview".to_string()
Expand Down
4 changes: 3 additions & 1 deletion src/tools/linkchecker/linkcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

set -e

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

if [ ! -d "$html_dir" ]
then
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/ci/build-all-targets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FAILS_DIR=failures
rm -rf $FAILS_DIR
mkdir $FAILS_DIR

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

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