Skip to content
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

Rollup of 8 pull requests #130753

Closed
wants to merge 23 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
de4c897
bootstrap: Set the dylib path when building books with rustdoc
cuviper Sep 18, 2024
b7c5656
replace some deprecated functions
Luv-Ray Sep 19, 2024
632342a
wrap `LLVMSetMetadata`
Luv-Ray Sep 19, 2024
e2ec83c
move place
Luv-Ray Sep 19, 2024
6da2d6e
MetadataType type cast
Luv-Ray Sep 19, 2024
019435b
Remove x86_64-fuchsia and aarch64-fuchsia target aliases
arttet Sep 21, 2024
8d28099
Add more test cases for block-no-opening-brace
GrigorenkoPV Sep 22, 2024
73cc575
Fix `break_last_token`.
nnethercote Sep 19, 2024
f7735f9
Add rustfmt 2024 reformatting to git blame ignore
Kobzol Sep 23, 2024
5c1c725
std: implement the `random` feature
joboet Aug 15, 2024
b9d47cf
std: switch to faster random sources on macOS and most BSDs
joboet Aug 17, 2024
a21ff01
miri: shim `CCRandomGenerateBytes`
joboet Aug 18, 2024
e94dd9b
random: add tracking issue, address other comments
joboet Sep 22, 2024
3ff09a0
update miri test
joboet Sep 22, 2024
b0c2c93
readd @tgross35 and @joboet to the review rotation
joboet Sep 23, 2024
5562780
Rollup merge of #129201 - joboet:random_faster_sources, r=joshtriplett
workingjubilee Sep 23, 2024
cda7e35
Rollup merge of #130389 - Luv-Ray:LLVMMDNodeInContext2, r=nikic
workingjubilee Sep 23, 2024
060e4ce
Rollup merge of #130536 - cuviper:rustbook-dylib-path, r=Mark-Simulacrum
workingjubilee Sep 23, 2024
a12fd2b
Rollup merge of #130551 - nnethercote:fix-break-last-token, r=petroch…
workingjubilee Sep 23, 2024
4f46b63
Rollup merge of #130657 - arttet:fix/fuchsia, r=jieyouxu
workingjubilee Sep 23, 2024
acb25ca
Rollup merge of #130721 - GrigorenkoPV:block-no-opening-brace, r=jiey…
workingjubilee Sep 23, 2024
0971803
Rollup merge of #130736 - Kobzol:rustfmt-2024-git-blame, r=compiler-e…
workingjubilee Sep 23, 2024
ad74c35
Rollup merge of #130746 - joboet:hello_again, r=joboet
workingjubilee Sep 23, 2024
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
20 changes: 11 additions & 9 deletions src/bootstrap/src/core/build_steps/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ macro_rules! book {
src: builder.src.join($path),
parent: Some(self),
languages: $lang.into(),
rustdoc: None,
rustdoc_compiler: None,
})
}
}
Expand Down Expand Up @@ -113,7 +113,7 @@ impl Step for UnstableBook {
src: builder.md_doc_out(self.target).join("unstable-book"),
parent: Some(self),
languages: vec![],
rustdoc: None,
rustdoc_compiler: None,
})
}
}
Expand All @@ -125,7 +125,7 @@ struct RustbookSrc<P: Step> {
src: PathBuf,
parent: Option<P>,
languages: Vec<&'static str>,
rustdoc: Option<PathBuf>,
rustdoc_compiler: Option<Compiler>,
}

impl<P: Step> Step for RustbookSrc<P> {
Expand Down Expand Up @@ -157,14 +157,17 @@ impl<P: Step> Step for RustbookSrc<P> {
let _ = fs::remove_dir_all(&out);

let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook);
if let Some(mut rustdoc) = self.rustdoc {

if let Some(compiler) = self.rustdoc_compiler {
let mut rustdoc = builder.rustdoc(compiler);
rustdoc.pop();
let old_path = env::var_os("PATH").unwrap_or_default();
let new_path =
env::join_paths(std::iter::once(rustdoc).chain(env::split_paths(&old_path)))
.expect("could not add rustdoc to PATH");

rustbook_cmd.env("PATH", new_path);
builder.add_rustc_lib_path(compiler, &mut rustbook_cmd);
}

rustbook_cmd.arg("build").arg(&src).arg("-d").arg(&out).run(builder);
Expand Down Expand Up @@ -240,7 +243,7 @@ impl Step for TheBook {
src: absolute_path.clone(),
parent: Some(self),
languages: vec![],
rustdoc: None,
rustdoc_compiler: None,
});

// building older edition redirects
Expand All @@ -253,7 +256,7 @@ impl Step for TheBook {
// treat the other editions as not having a parent.
parent: Option::<Self>::None,
languages: vec![],
rustdoc: None,
rustdoc_compiler: None,
});
}

Expand Down Expand Up @@ -1236,7 +1239,7 @@ impl Step for RustcBook {
src: out_base,
parent: Some(self),
languages: vec![],
rustdoc: None,
rustdoc_compiler: None,
});
}
}
Expand Down Expand Up @@ -1270,16 +1273,15 @@ impl Step for Reference {
// This is needed for generating links to the standard library using
// the mdbook-spec plugin.
builder.ensure(compile::Std::new(self.compiler, builder.config.build));
let rustdoc = builder.rustdoc(self.compiler);

// Run rustbook/mdbook to generate the HTML pages.
builder.ensure(RustbookSrc {
target: self.target,
name: "reference".to_owned(),
src: builder.src.join("src/doc/reference"),
rustdoc_compiler: Some(self.compiler),
parent: Some(self),
languages: vec![],
rustdoc: Some(rustdoc),
});
}
}