Skip to content

Commit 805d705

Browse files
committed
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.
1 parent dc2c356 commit 805d705

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

src/bootstrap/src/core/build_steps/doc.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,10 +1024,6 @@ macro_rules! tool_doc {
10241024
run.builder.ensure(Rustc::from_build_compiler(run.builder, compilers.build_compiler(), target));
10251025
compilers.build_compiler()
10261026
}
1027-
Mode::ToolBootstrap => {
1028-
// bootstrap/host tools should be documented with the stage 0 compiler
1029-
prepare_doc_compiler(run.builder, run.builder.host_target, 1)
1030-
}
10311027
Mode::ToolTarget => {
10321028
// target tools should be documented with the in-tree compiler
10331029
prepare_doc_compiler(run.builder, run.builder.host_target, run.builder.top_stage)
@@ -1132,7 +1128,7 @@ macro_rules! tool_doc {
11321128
tool_doc!(
11331129
BuildHelper,
11341130
"src/build_helper",
1135-
mode = Mode::ToolBootstrap,
1131+
mode = Mode::ToolTarget,
11361132
is_library = true,
11371133
crates = ["build_helper"]
11381134
);
@@ -1175,25 +1171,25 @@ tool_doc!(
11751171
// "specialization" feature in its build script when it detects a nightly toolchain.
11761172
allow_features: "specialization"
11771173
);
1178-
tool_doc!(Tidy, "src/tools/tidy", mode = Mode::ToolBootstrap, crates = ["tidy"]);
1174+
tool_doc!(Tidy, "src/tools/tidy", mode = Mode::ToolTarget, crates = ["tidy"]);
11791175
tool_doc!(
11801176
Bootstrap,
11811177
"src/bootstrap",
1182-
mode = Mode::ToolBootstrap,
1178+
mode = Mode::ToolTarget,
11831179
is_library = true,
11841180
crates = ["bootstrap"]
11851181
);
11861182
tool_doc!(
11871183
RunMakeSupport,
11881184
"src/tools/run-make-support",
1189-
mode = Mode::ToolBootstrap,
1185+
mode = Mode::ToolTarget,
11901186
is_library = true,
11911187
crates = ["run_make_support"]
11921188
);
11931189
tool_doc!(
11941190
Compiletest,
11951191
"src/tools/compiletest",
1196-
mode = Mode::ToolBootstrap,
1192+
mode = Mode::ToolTarget,
11971193
is_library = true,
11981194
crates = ["compiletest"]
11991195
);

src/bootstrap/src/core/builder/tests.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,13 +1158,12 @@ mod snapshot {
11581158
[doc] embedded-book (book) <host>
11591159
[doc] edition-guide (book) <host>
11601160
[doc] style-guide (book) <host>
1161-
[build] rustdoc 0 <host>
1162-
[doc] rustc 0 <host> -> Tidy 1 <host>
1163-
[doc] rustc 0 <host> -> Bootstrap 1 <host>
1161+
[doc] rustc 1 <host> -> Tidy 2 <host>
1162+
[doc] rustc 1 <host> -> Bootstrap 2 <host>
11641163
[doc] rustc 1 <host> -> releases 2 <host>
1165-
[doc] rustc 0 <host> -> RunMakeSupport 1 <host>
1166-
[doc] rustc 0 <host> -> BuildHelper 1 <host>
1167-
[doc] rustc 0 <host> -> Compiletest 1 <host>
1164+
[doc] rustc 1 <host> -> RunMakeSupport 2 <host>
1165+
[doc] rustc 1 <host> -> BuildHelper 2 <host>
1166+
[doc] rustc 1 <host> -> Compiletest 2 <host>
11681167
[build] rustc 0 <host> -> RustInstaller 1 <host>
11691168
"
11701169
);
@@ -2686,8 +2685,11 @@ mod snapshot {
26862685
.path("src/tools/compiletest")
26872686
.stage(2)
26882687
.render_steps(), @r"
2689-
[build] rustdoc 0 <host>
2690-
[doc] rustc 0 <host> -> Compiletest 1 <host>
2688+
[build] llvm <host>
2689+
[build] rustc 0 <host> -> rustc 1 <host>
2690+
[build] rustc 1 <host> -> std 1 <host>
2691+
[build] rustdoc 1 <host>
2692+
[doc] rustc 1 <host> -> Compiletest 2 <host>
26912693
");
26922694
}
26932695

0 commit comments

Comments
 (0)