@@ -1024,12 +1024,9 @@ macro_rules! tool_doc {
1024
1024
run. builder. ensure( Rustc :: from_build_compiler( run. builder, compilers. build_compiler( ) , target) ) ;
1025
1025
compilers. build_compiler( )
1026
1026
}
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
- }
1031
1027
Mode :: ToolTarget => {
1032
- // target tools should be documented with the in-tree compiler
1028
+ // when shipping multiple docs together in one folder,
1029
+ // they all need to use the same rustdoc version
1033
1030
prepare_doc_compiler( run. builder, run. builder. host_target, run. builder. top_stage)
1034
1031
}
1035
1032
_ => {
@@ -1132,7 +1129,11 @@ macro_rules! tool_doc {
1132
1129
tool_doc ! (
1133
1130
BuildHelper ,
1134
1131
"src/build_helper" ,
1135
- mode = Mode :: ToolBootstrap ,
1132
+ // ideally, this would use ToolBootstrap,
1133
+ // but we distribute these docs together in the same folder
1134
+ // as a bunch of stage1 tools, and you can't mix rustdoc versions
1135
+ // because that breaks cross-crate data (particularly search)
1136
+ mode = Mode :: ToolTarget ,
1136
1137
is_library = true ,
1137
1138
crates = [ "build_helper" ]
1138
1139
) ;
@@ -1175,25 +1176,25 @@ tool_doc!(
1175
1176
// "specialization" feature in its build script when it detects a nightly toolchain.
1176
1177
allow_features: "specialization"
1177
1178
) ;
1178
- tool_doc ! ( Tidy , "src/tools/tidy" , mode = Mode :: ToolBootstrap , crates = [ "tidy" ] ) ;
1179
+ tool_doc ! ( Tidy , "src/tools/tidy" , mode = Mode :: ToolTarget , crates = [ "tidy" ] ) ;
1179
1180
tool_doc ! (
1180
1181
Bootstrap ,
1181
1182
"src/bootstrap" ,
1182
- mode = Mode :: ToolBootstrap ,
1183
+ mode = Mode :: ToolTarget ,
1183
1184
is_library = true ,
1184
1185
crates = [ "bootstrap" ]
1185
1186
) ;
1186
1187
tool_doc ! (
1187
1188
RunMakeSupport ,
1188
1189
"src/tools/run-make-support" ,
1189
- mode = Mode :: ToolBootstrap ,
1190
+ mode = Mode :: ToolTarget ,
1190
1191
is_library = true ,
1191
1192
crates = [ "run_make_support" ]
1192
1193
) ;
1193
1194
tool_doc ! (
1194
1195
Compiletest ,
1195
1196
"src/tools/compiletest" ,
1196
- mode = Mode :: ToolBootstrap ,
1197
+ mode = Mode :: ToolTarget ,
1197
1198
is_library = true ,
1198
1199
crates = [ "compiletest" ]
1199
1200
) ;
0 commit comments