@@ -746,7 +746,16 @@ impl Step for Rustc {
746
746
}
747
747
748
748
macro_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
+ ) => {
750
759
#[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
751
760
pub struct $tool {
752
761
target: TargetSelection ,
@@ -834,7 +843,11 @@ macro_rules! tool_doc {
834
843
cargo. arg( "-Zskip-rustdoc-fingerprint" ) ;
835
844
// Only include compiler crates, no dependencies of those, such as `libc`.
836
845
cargo. arg( "--no-deps" ) ;
837
- cargo. arg( "--lib" ) ;
846
+
847
+ if false $( || $only_libs) ? {
848
+ cargo. arg( "--lib" ) ;
849
+ }
850
+
838
851
$(
839
852
cargo. arg( "-p" ) . arg( $krate) ;
840
853
) +
@@ -886,7 +899,14 @@ tool_doc!(
886
899
]
887
900
) ;
888
901
tool_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
+ ) ;
890
910
891
911
#[ derive( Ord , PartialOrd , Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
892
912
pub struct ErrorIndex {
0 commit comments