Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
54a4701
tests: Test line number in debuginfo for diverging function calls
Enselic Jul 16, 2025
66d2d16
Create two methods to fix `find_oldest_ancestor_in_same_ctxt`
xizheyin Jul 21, 2025
c89fe80
Rename extended rustc tool macros
Kobzol Jun 18, 2025
d1683e7
Add metadata to `Cargo` and `RustAnalyzer` tools
Kobzol Jul 22, 2025
ca66698
Cleanup `ensure_if_default` to not require `Option` output
Kobzol Jul 22, 2025
1783af7
Add step metadata to `RustAnalyzerProcMacroSrv`
Kobzol Jul 22, 2025
533a78d
Rename `Builder::rustdoc` to `Builder::rustdoc_for_compiler`
Kobzol Jul 22, 2025
7a5f9cb
Implement `RustcPrivateCompilers` to unify building of `rustc_private…
Kobzol Jul 22, 2025
d5ac269
Add step metadata and a few tests for `Doc` steps
Kobzol Jul 22, 2025
6fecbb9
Refactor `Rustdoc`
Kobzol Jul 22, 2025
006a9bd
Fix `ToolRustc` build with `download-rustc`
Kobzol Jul 22, 2025
acb2379
Add step metadata and a simple test for codegen backends
Kobzol Jul 22, 2025
efbaa77
Port codegen backends to `RustcPrivateCompilers`
Kobzol Jul 22, 2025
3f53fba
Rename `link_compiler` to `target_compiler`
Kobzol Jul 22, 2025
7bf4a1a
Appease Clippy
Kobzol Jul 22, 2025
0b88bea
Move `dist-apple-various` from x86_64 to aarch64
shepmaster Jul 23, 2025
e497abc
Add stabilization template and revise docs
Jan 23, 2025
857f46e
Address review feedback
nikomatsakis Jan 23, 2025
7547b15
Address review feedback
jieyouxu Jun 19, 2025
64604ad
Revise content on lang feature processes
traviscross Jul 23, 2025
9c99623
Merge PR: Stabilization template, docs
traviscross Jul 25, 2025
d12ecde
constify with_exposed_provenance
RalfJung Jul 27, 2025
72927f6
Ensure correct aligement of rustc_hir::Lifetime on platforms with low…
FractalFir Jul 27, 2025
8d82365
Prepare for merging from rust-lang/rust
invalid-email-address Jul 28, 2025
645b85e
Merge ref '2b5e239c6b86' from rust-lang/rust
invalid-email-address Jul 28, 2025
466198c
Merge pull request #2519 from rust-lang/rustc-pull
tshepang Jul 28, 2025
66445e7
fix pauses
tshepang Jul 28, 2025
b707493
reword to avoid using a term used in a confusing manner, "error annot…
tshepang Jul 28, 2025
bfca77b
Merge pull request #2520 from rust-lang/tshepang/error-pattern
tshepang Jul 28, 2025
f29f073
add support for ./x check src/tools/linkchecker
emilyalbini Jul 13, 2025
c745614
bump linkchecker to edition 2024
emilyalbini Jul 13, 2025
984926e
add an argument parser to linkchecker
emilyalbini Jul 1, 2025
2b11851
Raw Pointers are Constant PatKinds too
BoxyUwU Jul 28, 2025
6693b39
add --link-targets-dir flag to linkchecker
emilyalbini Jul 1, 2025
c340233
fixed typo chunks->as_chunks
xonx4l Jul 28, 2025
68f08c5
Add `core::mem::DropGuard`
yoshuawuyts Jul 21, 2025
71920e2
fix `Atomic*::as_ptr` wording
usamoi Jul 28, 2025
3fd51ff
Rollup merge of #143883 - pietroalbini:pa-linkchecker-extra-target, r…
Zalathar Jul 29, 2025
be00c80
Rollup merge of #144034 - Enselic:diverging-function-call-debuginfo, …
Zalathar Jul 29, 2025
a8b4d6f
Rollup merge of #144236 - yoshuawuyts:drop-guard, r=Mark-Simulacrum
Zalathar Jul 29, 2025
cb1c60d
Rollup merge of #144268 - xizheyin:find-oldest-ancestor, r=jieyouxu
Zalathar Jul 29, 2025
ebe2728
Rollup merge of #144303 - Kobzol:bootstrap-tool-cleanup, r=jieyouxu
Zalathar Jul 29, 2025
e66e165
Rollup merge of #144367 - shepmaster:reduce-x86-macos-runner-usage, r…
Zalathar Jul 29, 2025
1cf467b
Rollup merge of #144539 - RalfJung:const_with_exposed_provenance, r=o…
Zalathar Jul 29, 2025
85bfbf9
Rollup merge of #144569 - tshepang:rdg-sync, r=Kobzol
Zalathar Jul 29, 2025
89a8c20
Rollup merge of #144573 - BoxyUwU:patkind_constant_ptr_docs, r=lcnr
Zalathar Jul 29, 2025
564de7e
Rollup merge of #144575 - xonx4l:patch-6, r=scottmcm
Zalathar Jul 29, 2025
f7e8322
Rollup merge of #144578 - FractalFir:m68k_fix, r=compiler-errors
Zalathar Jul 29, 2025
dcb6be3
Rollup merge of #144582 - usamoi:docs, r=RalfJung
Zalathar Jul 29, 2025
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
Prev Previous commit
Next Next commit
Rename Builder::rustdoc to Builder::rustdoc_for_compiler
To clarify what it does.
  • Loading branch information
Kobzol committed Jul 23, 2025
commit 533a78dc2051dd755b98882a6118760261d5a40a
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ impl Step for Rustc {
.as_ref()
.is_none_or(|tools| tools.iter().any(|tool| tool == "rustdoc"))
{
let rustdoc = builder.rustdoc(compiler);
let rustdoc = builder.rustdoc_for_compiler(compiler);
builder.install(&rustdoc, &image.join("bin"), FileType::Executable);
}

Expand Down
6 changes: 3 additions & 3 deletions src/bootstrap/src/core/build_steps/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl<P: Step> Step for RustbookSrc<P> {
let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook);

if let Some(compiler) = self.rustdoc_compiler {
let mut rustdoc = builder.rustdoc(compiler);
let mut rustdoc = builder.rustdoc_for_compiler(compiler);
rustdoc.pop();
let old_path = env::var_os("PATH").unwrap_or_default();
let new_path =
Expand Down Expand Up @@ -365,7 +365,7 @@ impl Step for Standalone {
}

let html = out.join(filename).with_extension("html");
let rustdoc = builder.rustdoc(compiler);
let rustdoc = builder.rustdoc_for_compiler(compiler);
if up_to_date(&path, &html)
&& up_to_date(&footer, &html)
&& up_to_date(&favicon, &html)
Expand Down Expand Up @@ -463,7 +463,7 @@ impl Step for Releases {
let html = out.join("releases.html");
let tmppath = out.join("releases.md");
let inpath = builder.src.join("RELEASES.md");
let rustdoc = builder.rustdoc(compiler);
let rustdoc = builder.rustdoc_for_compiler(compiler);
if !up_to_date(&inpath, &html)
|| !up_to_date(&footer, &html)
|| !up_to_date(&favicon, &html)
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/perf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Consider setting `rust.debuginfo-level = 1` in `bootstrap.toml`."#);
if let Some(opts) = args.cmd.shared_opts()
&& opts.profiles.contains(&Profile::Doc)
{
builder.ensure(Rustdoc { compiler });
builder.ensure(Rustdoc { target_compiler: compiler });
}

let sysroot = builder.ensure(Sysroot::new(compiler));
Expand Down
16 changes: 10 additions & 6 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ impl Step for Cargotest {
.arg(&out_dir)
.args(builder.config.test_args())
.env("RUSTC", builder.rustc(compiler))
.env("RUSTDOC", builder.rustdoc(compiler));
.env("RUSTDOC", builder.rustdoc_for_compiler(compiler));
add_rustdoc_cargo_linker_args(
&mut cmd,
builder,
Expand Down Expand Up @@ -861,7 +861,7 @@ impl Step for RustdocTheme {
.env("RUSTC_SYSROOT", builder.sysroot(self.compiler))
.env("RUSTDOC_LIBDIR", builder.sysroot_target_libdir(self.compiler, self.compiler.host))
.env("CFG_RELEASE_CHANNEL", &builder.config.channel)
.env("RUSTDOC_REAL", builder.rustdoc(self.compiler))
.env("RUSTDOC_REAL", builder.rustdoc_for_compiler(self.compiler))
.env("RUSTC_BOOTSTRAP", "1");
cmd.args(linker_args(builder, self.compiler.host, LldThreads::No, self.compiler.stage));

Expand Down Expand Up @@ -1020,7 +1020,11 @@ impl Step for RustdocGUI {
let mut cmd = builder.tool_cmd(Tool::RustdocGUITest);

let out_dir = builder.test_out(self.target).join("rustdoc-gui");
build_stamp::clear_if_dirty(builder, &out_dir, &builder.rustdoc(self.compiler));
build_stamp::clear_if_dirty(
builder,
&out_dir,
&builder.rustdoc_for_compiler(self.compiler),
);

if let Some(src) = builder.config.src.to_str() {
cmd.arg("--rust-src").arg(src);
Expand All @@ -1036,7 +1040,7 @@ impl Step for RustdocGUI {

cmd.arg("--jobs").arg(builder.jobs().to_string());

cmd.env("RUSTDOC", builder.rustdoc(self.compiler))
cmd.env("RUSTDOC", builder.rustdoc_for_compiler(self.compiler))
.env("RUSTC", builder.rustc(self.compiler));

add_rustdoc_cargo_linker_args(
Expand Down Expand Up @@ -1720,7 +1724,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
|| mode == "rustdoc-json"
|| suite == "coverage-run-rustdoc"
{
cmd.arg("--rustdoc-path").arg(builder.rustdoc(compiler));
cmd.arg("--rustdoc-path").arg(builder.rustdoc_for_compiler(compiler));
}

if mode == "rustdoc-json" {
Expand Down Expand Up @@ -2234,7 +2238,7 @@ impl BookTest {

// mdbook just executes a binary named "rustdoc", so we need to update
// PATH so that it points to our rustdoc.
let mut rustdoc_path = builder.rustdoc(compiler);
let mut rustdoc_path = builder.rustdoc_for_compiler(compiler);
rustdoc_path.pop();
let old_path = env::var_os("PATH").unwrap_or_default();
let new_path = env::join_paths(iter::once(rustdoc_path).chain(env::split_paths(&old_path)))
Expand Down
13 changes: 7 additions & 6 deletions src/bootstrap/src/core/build_steps/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ impl Step for RemoteTestServer {
pub struct Rustdoc {
/// This should only ever be 0 or 2.
/// We sometimes want to reference the "bootstrap" rustdoc, which is why this option is here.
pub compiler: Compiler,
pub target_compiler: Compiler,
}

impl Step for Rustdoc {
Expand All @@ -736,12 +736,13 @@ impl Step for Rustdoc {
}

fn make_run(run: RunConfig<'_>) {
run.builder
.ensure(Rustdoc { compiler: run.builder.compiler(run.builder.top_stage, run.target) });
run.builder.ensure(Rustdoc {
target_compiler: run.builder.compiler(run.builder.top_stage, run.target),
});
}

fn run(self, builder: &Builder<'_>) -> ToolBuildResult {
let target_compiler = self.compiler;
let target_compiler = self.target_compiler;
let target = target_compiler.host;

if target_compiler.stage == 0 {
Expand Down Expand Up @@ -838,11 +839,11 @@ impl Step for Rustdoc {

fn metadata(&self) -> Option<StepMetadata> {
Some(
StepMetadata::build("rustdoc", self.compiler.host)
StepMetadata::build("rustdoc", self.target_compiler.host)
// rustdoc is ToolRustc, so stage N rustdoc is built by stage N-1 rustc
// FIXME: make this stage deduction automatic somehow
// FIXME: log the compiler that actually built ToolRustc steps
.stage(self.compiler.stage.saturating_sub(1)),
.stage(self.target_compiler.stage.saturating_sub(1)),
)
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/src/core/builder/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ impl Builder<'_> {
}
_ => panic!("doc mode {mode:?} not expected"),
};
let rustdoc = self.rustdoc(compiler);
let rustdoc = self.rustdoc_for_compiler(compiler);
build_stamp::clear_if_dirty(self, &my_out, &rustdoc);
}

Expand Down Expand Up @@ -822,7 +822,7 @@ impl Builder<'_> {
}

let rustdoc_path = match cmd_kind {
Kind::Doc | Kind::Test | Kind::MiriTest => self.rustdoc(compiler),
Kind::Doc | Kind::Test | Kind::MiriTest => self.rustdoc_for_compiler(compiler),
_ => PathBuf::from("/path/to/nowhere/rustdoc/not/required"),
};

Expand Down
9 changes: 6 additions & 3 deletions src/bootstrap/src/core/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1534,8 +1534,11 @@ You have to build a stage1 compiler for `{}` first, and then use it to build a s
.map(|entry| entry.path())
}

pub fn rustdoc(&self, compiler: Compiler) -> PathBuf {
self.ensure(tool::Rustdoc { compiler }).tool_path
/// Returns a path to `Rustdoc` that "belongs" to the `target_compiler`.
/// It can be either a stage0 rustdoc or a locally built rustdoc that *links* to
/// `target_compiler`.
pub fn rustdoc_for_compiler(&self, target_compiler: Compiler) -> PathBuf {
self.ensure(tool::Rustdoc { target_compiler }).tool_path
}

pub fn cargo_clippy_cmd(&self, run_compiler: Compiler) -> BootstrapCommand {
Expand Down Expand Up @@ -1595,7 +1598,7 @@ You have to build a stage1 compiler for `{}` first, and then use it to build a s
// equivalently to rustc.
.env("RUSTDOC_LIBDIR", self.rustc_libdir(compiler))
.env("CFG_RELEASE_CHANNEL", &self.config.channel)
.env("RUSTDOC_REAL", self.rustdoc(compiler))
.env("RUSTDOC_REAL", self.rustdoc_for_compiler(compiler))
.env("RUSTC_BOOTSTRAP", "1");

cmd.arg("-Wrustdoc::invalid_codeblock_attributes");
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/src/core/builder/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ mod defaults {
// not the one it was built by.
assert_eq!(
first(cache.all::<tool::Rustdoc>()),
&[tool::Rustdoc { compiler: Compiler::new(1, a) },]
&[tool::Rustdoc { target_compiler: Compiler::new(1, a) },]
);
}
}
Expand Down Expand Up @@ -341,7 +341,7 @@ mod dist {
// stage minus 1 if --stage is not 0. Very confusing!
assert_eq!(
first(builder.cache.all::<tool::Rustdoc>()),
&[tool::Rustdoc { compiler: Compiler::new(2, a) },]
&[tool::Rustdoc { target_compiler: Compiler::new(2, a) },]
);
}
}
Expand Down