mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-02 21:38:52 +00:00
Rollup merge of #147172 - notriddle:tooldoc, r=Kobzol
bootstrap: build bootstrap docs with in-tree rustdoc All of the docs need to be built with the same rustdoc. Otherwise, any change to the search index breaks everything, because the two rustdocs don't agree on the format. Fixes https://github.com/rust-lang/rust/issues/147142
This commit is contained in:
commit
4cbaa70101
@ -1024,12 +1024,9 @@ macro_rules! tool_doc {
|
|||||||
run.builder.ensure(Rustc::from_build_compiler(run.builder, compilers.build_compiler(), target));
|
run.builder.ensure(Rustc::from_build_compiler(run.builder, compilers.build_compiler(), target));
|
||||||
compilers.build_compiler()
|
compilers.build_compiler()
|
||||||
}
|
}
|
||||||
Mode::ToolBootstrap => {
|
|
||||||
// bootstrap/host tools should be documented with the stage 0 compiler
|
|
||||||
prepare_doc_compiler(run.builder, run.builder.host_target, 1)
|
|
||||||
}
|
|
||||||
Mode::ToolTarget => {
|
Mode::ToolTarget => {
|
||||||
// target tools should be documented with the in-tree compiler
|
// when shipping multiple docs together in one folder,
|
||||||
|
// they all need to use the same rustdoc version
|
||||||
prepare_doc_compiler(run.builder, run.builder.host_target, run.builder.top_stage)
|
prepare_doc_compiler(run.builder, run.builder.host_target, run.builder.top_stage)
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
@ -1132,7 +1129,11 @@ macro_rules! tool_doc {
|
|||||||
tool_doc!(
|
tool_doc!(
|
||||||
BuildHelper,
|
BuildHelper,
|
||||||
"src/build_helper",
|
"src/build_helper",
|
||||||
mode = Mode::ToolBootstrap,
|
// ideally, this would use ToolBootstrap,
|
||||||
|
// but we distribute these docs together in the same folder
|
||||||
|
// as a bunch of stage1 tools, and you can't mix rustdoc versions
|
||||||
|
// because that breaks cross-crate data (particularly search)
|
||||||
|
mode = Mode::ToolTarget,
|
||||||
is_library = true,
|
is_library = true,
|
||||||
crates = ["build_helper"]
|
crates = ["build_helper"]
|
||||||
);
|
);
|
||||||
@ -1175,25 +1176,25 @@ tool_doc!(
|
|||||||
// "specialization" feature in its build script when it detects a nightly toolchain.
|
// "specialization" feature in its build script when it detects a nightly toolchain.
|
||||||
allow_features: "specialization"
|
allow_features: "specialization"
|
||||||
);
|
);
|
||||||
tool_doc!(Tidy, "src/tools/tidy", mode = Mode::ToolBootstrap, crates = ["tidy"]);
|
tool_doc!(Tidy, "src/tools/tidy", mode = Mode::ToolTarget, crates = ["tidy"]);
|
||||||
tool_doc!(
|
tool_doc!(
|
||||||
Bootstrap,
|
Bootstrap,
|
||||||
"src/bootstrap",
|
"src/bootstrap",
|
||||||
mode = Mode::ToolBootstrap,
|
mode = Mode::ToolTarget,
|
||||||
is_library = true,
|
is_library = true,
|
||||||
crates = ["bootstrap"]
|
crates = ["bootstrap"]
|
||||||
);
|
);
|
||||||
tool_doc!(
|
tool_doc!(
|
||||||
RunMakeSupport,
|
RunMakeSupport,
|
||||||
"src/tools/run-make-support",
|
"src/tools/run-make-support",
|
||||||
mode = Mode::ToolBootstrap,
|
mode = Mode::ToolTarget,
|
||||||
is_library = true,
|
is_library = true,
|
||||||
crates = ["run_make_support"]
|
crates = ["run_make_support"]
|
||||||
);
|
);
|
||||||
tool_doc!(
|
tool_doc!(
|
||||||
Compiletest,
|
Compiletest,
|
||||||
"src/tools/compiletest",
|
"src/tools/compiletest",
|
||||||
mode = Mode::ToolBootstrap,
|
mode = Mode::ToolTarget,
|
||||||
is_library = true,
|
is_library = true,
|
||||||
crates = ["compiletest"]
|
crates = ["compiletest"]
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1158,13 +1158,12 @@ mod snapshot {
|
|||||||
[doc] embedded-book (book) <host>
|
[doc] embedded-book (book) <host>
|
||||||
[doc] edition-guide (book) <host>
|
[doc] edition-guide (book) <host>
|
||||||
[doc] style-guide (book) <host>
|
[doc] style-guide (book) <host>
|
||||||
[build] rustdoc 0 <host>
|
[doc] rustc 1 <host> -> Tidy 2 <host>
|
||||||
[doc] rustc 0 <host> -> Tidy 1 <host>
|
[doc] rustc 1 <host> -> Bootstrap 2 <host>
|
||||||
[doc] rustc 0 <host> -> Bootstrap 1 <host>
|
|
||||||
[doc] rustc 1 <host> -> releases 2 <host>
|
[doc] rustc 1 <host> -> releases 2 <host>
|
||||||
[doc] rustc 0 <host> -> RunMakeSupport 1 <host>
|
[doc] rustc 1 <host> -> RunMakeSupport 2 <host>
|
||||||
[doc] rustc 0 <host> -> BuildHelper 1 <host>
|
[doc] rustc 1 <host> -> BuildHelper 2 <host>
|
||||||
[doc] rustc 0 <host> -> Compiletest 1 <host>
|
[doc] rustc 1 <host> -> Compiletest 2 <host>
|
||||||
[build] rustc 0 <host> -> RustInstaller 1 <host>
|
[build] rustc 0 <host> -> RustInstaller 1 <host>
|
||||||
"
|
"
|
||||||
);
|
);
|
||||||
@ -2686,8 +2685,11 @@ mod snapshot {
|
|||||||
.path("src/tools/compiletest")
|
.path("src/tools/compiletest")
|
||||||
.stage(2)
|
.stage(2)
|
||||||
.render_steps(), @r"
|
.render_steps(), @r"
|
||||||
[build] rustdoc 0 <host>
|
[build] llvm <host>
|
||||||
[doc] rustc 0 <host> -> Compiletest 1 <host>
|
[build] rustc 0 <host> -> rustc 1 <host>
|
||||||
|
[build] rustc 1 <host> -> std 1 <host>
|
||||||
|
[build] rustdoc 1 <host>
|
||||||
|
[doc] rustc 1 <host> -> Compiletest 2 <host>
|
||||||
");
|
");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user