@@ -541,52 +541,77 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
541
541
//
542
542
// Tools used during the build system but not shipped
543
543
rules. build ( "tool-rustbook" , "src/tools/rustbook" )
544
+ . default ( build. config . build_all_tools )
545
+ . host ( true )
544
546
. dep ( |s| s. name ( "maybe-clean-tools" ) )
545
547
. dep ( |s| s. name ( "librustc-tool" ) )
546
548
. run ( move |s| compile:: tool ( build, s. stage , s. target , "rustbook" ) ) ;
547
549
rules. build ( "tool-error-index" , "src/tools/error_index_generator" )
550
+ . default ( build. config . build_all_tools )
551
+ . host ( true )
548
552
. dep ( |s| s. name ( "maybe-clean-tools" ) )
549
553
. dep ( |s| s. name ( "librustc-tool" ) )
550
554
. run ( move |s| compile:: tool ( build, s. stage , s. target , "error_index_generator" ) ) ;
551
555
rules. build ( "tool-unstable-book-gen" , "src/tools/unstable-book-gen" )
556
+ . default ( build. config . build_all_tools )
557
+ . host ( true )
552
558
. dep ( |s| s. name ( "maybe-clean-tools" ) )
553
559
. dep ( |s| s. name ( "libstd-tool" ) )
554
560
. run ( move |s| compile:: tool ( build, s. stage , s. target , "unstable-book-gen" ) ) ;
555
561
rules. build ( "tool-tidy" , "src/tools/tidy" )
562
+ . default ( build. config . build_all_tools )
563
+ . host ( true )
564
+ . only_build ( true )
556
565
. dep ( |s| s. name ( "maybe-clean-tools" ) )
557
566
. dep ( |s| s. name ( "libstd-tool" ) )
558
567
. run ( move |s| compile:: tool ( build, s. stage , s. target , "tidy" ) ) ;
559
568
rules. build ( "tool-linkchecker" , "src/tools/linkchecker" )
569
+ . default ( build. config . build_all_tools )
570
+ . host ( true )
560
571
. dep ( |s| s. name ( "maybe-clean-tools" ) )
561
572
. dep ( |s| s. name ( "libstd-tool" ) )
562
573
. run ( move |s| compile:: tool ( build, s. stage , s. target , "linkchecker" ) ) ;
563
574
rules. build ( "tool-cargotest" , "src/tools/cargotest" )
575
+ . default ( build. config . build_all_tools )
576
+ . host ( true )
564
577
. dep ( |s| s. name ( "maybe-clean-tools" ) )
565
578
. dep ( |s| s. name ( "libstd-tool" ) )
566
579
. run ( move |s| compile:: tool ( build, s. stage , s. target , "cargotest" ) ) ;
567
580
rules. build ( "tool-compiletest" , "src/tools/compiletest" )
581
+ . default ( build. config . build_all_tools )
582
+ . host ( true )
568
583
. dep ( |s| s. name ( "maybe-clean-tools" ) )
569
584
. dep ( |s| s. name ( "libtest-tool" ) )
570
585
. run ( move |s| compile:: tool ( build, s. stage , s. target , "compiletest" ) ) ;
571
586
rules. build ( "tool-build-manifest" , "src/tools/build-manifest" )
587
+ . default ( build. config . build_all_tools )
588
+ . host ( true )
589
+ . only_build ( true )
590
+ . only_host_build ( true )
572
591
. dep ( |s| s. name ( "maybe-clean-tools" ) )
573
592
. dep ( |s| s. name ( "libstd-tool" ) )
574
593
. run ( move |s| compile:: tool ( build, s. stage , s. target , "build-manifest" ) ) ;
575
594
rules. build ( "tool-remote-test-server" , "src/tools/remote-test-server" )
595
+ . default ( build. config . build_all_tools )
596
+ . host ( true )
576
597
. dep ( |s| s. name ( "maybe-clean-tools" ) )
577
598
. dep ( |s| s. name ( "libstd-tool" ) )
578
599
. run ( move |s| compile:: tool ( build, s. stage , s. target , "remote-test-server" ) ) ;
579
600
rules. build ( "tool-remote-test-client" , "src/tools/remote-test-client" )
601
+ . default ( build. config . build_all_tools )
602
+ . host ( true )
580
603
. dep ( |s| s. name ( "maybe-clean-tools" ) )
581
604
. dep ( |s| s. name ( "libstd-tool" ) )
582
605
. run ( move |s| compile:: tool ( build, s. stage , s. target , "remote-test-client" ) ) ;
583
606
rules. build ( "tool-rust-installer" , "src/tools/rust-installer" )
607
+ . default ( build. config . build_all_tools )
608
+ . host ( true )
584
609
. dep ( |s| s. name ( "maybe-clean-tools" ) )
585
610
. dep ( |s| s. name ( "libstd-tool" ) )
586
611
. run ( move |s| compile:: tool ( build, s. stage , s. target , "rust-installer" ) ) ;
587
612
rules. build ( "tool-cargo" , "src/tools/cargo" )
613
+ . default ( build. config . extended || build. config . build_all_tools )
588
614
. host ( true )
589
- . default ( build. config . extended )
590
615
. dep ( |s| s. name ( "maybe-clean-tools" ) )
591
616
. dep ( |s| s. name ( "libstd-tool" ) )
592
617
. dep ( |s| s. stage ( 0 ) . host ( s. target ) . name ( "openssl" ) )
@@ -599,8 +624,8 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
599
624
} )
600
625
. run ( move |s| compile:: tool ( build, s. stage , s. target , "cargo" ) ) ;
601
626
rules. build ( "tool-rls" , "src/tools/rls" )
627
+ . default ( build. config . extended || build. config . build_all_tools )
602
628
. host ( true )
603
- . default ( build. config . extended )
604
629
. dep ( |s| s. name ( "librustc-tool" ) )
605
630
. dep ( |s| s. stage ( 0 ) . host ( s. target ) . name ( "openssl" ) )
606
631
. dep ( move |s| {
0 commit comments