@@ -746,7 +746,16 @@ impl Step for Rustc {
746746}
747747
748748macro_rules! tool_doc {
749- ( $tool: ident, $should_run: literal, $path: literal, $( rustc_tool = $rustc_tool: literal, ) ? $( in_tree = $in_tree: literal, ) ? [ $( $krate: literal) ,+ $( , ) ?] $( , ) ?) => {
749+ (
750+ $tool: ident,
751+ $should_run: literal,
752+ $path: literal,
753+ $( rustc_tool = $rustc_tool: literal, ) ?
754+ $( in_tree = $in_tree: literal, ) ?
755+ $( only_libs = $only_libs: literal, ) ?
756+ [ $( $krate: literal) ,+ $( , ) ?]
757+ $( , ) ?
758+ ) => {
750759 #[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
751760 pub struct $tool {
752761 target: TargetSelection ,
@@ -834,7 +843,11 @@ macro_rules! tool_doc {
834843 cargo. arg( "-Zskip-rustdoc-fingerprint" ) ;
835844 // Only include compiler crates, no dependencies of those, such as `libc`.
836845 cargo. arg( "--no-deps" ) ;
837- cargo. arg( "--lib" ) ;
846+
847+ if false $( || $only_libs) ? {
848+ cargo. arg( "--lib" ) ;
849+ }
850+
838851 $(
839852 cargo. arg( "-p" ) . arg( $krate) ;
840853 ) +
@@ -886,7 +899,14 @@ tool_doc!(
886899 ]
887900) ;
888901tool_doc ! ( Tidy , "tidy" , "src/tools/tidy" , rustc_tool = false , [ "tidy" ] ) ;
889- tool_doc ! ( Bootstrap , "bootstrap" , "src/bootstrap" , rustc_tool = false , [ "bootstrap" ] ) ;
902+ tool_doc ! (
903+ Bootstrap ,
904+ "bootstrap" ,
905+ "src/bootstrap" ,
906+ rustc_tool = false ,
907+ only_libs = true ,
908+ [ "bootstrap" ]
909+ ) ;
890910
891911#[ derive( Ord , PartialOrd , Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
892912pub struct ErrorIndex {
0 commit comments