File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -613,9 +613,14 @@ mod dist {
613613 // Note that the stages here are +1 than what they actually are because
614614 // Rustdoc::run swaps out the compiler with stage minus 1 if --stage is
615615 // not 0.
616+ //
617+ // The stage 0 copy is the one downloaded for bootstrapping. It is
618+ // (currently) needed to run "cargo test" on the linkchecker, and
619+ // should be relatively "free".
616620 assert_eq ! (
617621 first( builder. cache. all:: <tool:: Rustdoc >( ) ) ,
618622 & [
623+ tool:: Rustdoc { compiler: Compiler { host: a, stage: 0 } } ,
619624 tool:: Rustdoc { compiler: Compiler { host: a, stage: 1 } } ,
620625 tool:: Rustdoc { compiler: Compiler { host: a, stage: 2 } } ,
621626 ]
Original file line number Diff line number Diff line change @@ -124,8 +124,25 @@ You can skip linkcheck with --exclude src/tools/linkchecker"
124124
125125 builder. info ( & format ! ( "Linkcheck ({})" , host) ) ;
126126
127+ // Test the linkchecker itself.
128+ let bootstrap_host = builder. config . build ;
129+ let compiler = builder. compiler ( 0 , bootstrap_host) ;
130+ let cargo = tool:: prepare_tool_cargo (
131+ builder,
132+ compiler,
133+ Mode :: ToolBootstrap ,
134+ bootstrap_host,
135+ "test" ,
136+ "src/tools/linkchecker" ,
137+ SourceType :: InTree ,
138+ & [ ] ,
139+ ) ;
140+ try_run ( builder, & mut cargo. into ( ) ) ;
141+
142+ // Build all the default documentation.
127143 builder. default_doc ( & [ ] ) ;
128144
145+ // Run the linkchecker.
129146 let _time = util:: timeit ( & builder) ;
130147 try_run (
131148 builder,
You can’t perform that action at this time.
0 commit comments