@@ -268,10 +268,6 @@ macro_rules! bootstrap_tool {
268
268
}
269
269
270
270
impl Tool {
271
- pub fn get_mode( & self ) -> Mode {
272
- Mode :: ToolBootstrap
273
- }
274
-
275
271
/// Whether this tool requires LLVM to run
276
272
pub fn uses_llvm_tools( & self ) -> bool {
277
273
match self {
@@ -345,6 +341,7 @@ bootstrap_tool!(
345
341
Compiletest , "src/tools/compiletest" , "compiletest" , llvm_tools = true ;
346
342
BuildManifest , "src/tools/build-manifest" , "build-manifest" ;
347
343
RemoteTestClient , "src/tools/remote-test-client" , "remote-test-client" ;
344
+ RemoteTestServer , "src/tools/remote-test-server" , "remote-test-server" ;
348
345
RustInstaller , "src/tools/rust-installer" , "fabricate" , is_external_tool = true ;
349
346
RustdocTheme , "src/tools/rustdoc-themes" , "rustdoc-themes" ;
350
347
) ;
@@ -397,40 +394,6 @@ impl Step for ErrorIndex {
397
394
}
398
395
}
399
396
400
- #[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
401
- pub struct RemoteTestServer {
402
- pub compiler : Compiler ,
403
- pub target : Interned < String > ,
404
- }
405
-
406
- impl Step for RemoteTestServer {
407
- type Output = PathBuf ;
408
-
409
- fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
410
- run. path ( "src/tools/remote-test-server" )
411
- }
412
-
413
- fn make_run ( run : RunConfig < ' _ > ) {
414
- run. builder . ensure ( RemoteTestServer {
415
- compiler : run. builder . compiler ( run. builder . top_stage , run. builder . config . build ) ,
416
- target : run. target ,
417
- } ) ;
418
- }
419
-
420
- fn run ( self , builder : & Builder < ' _ > ) -> PathBuf {
421
- builder. ensure ( ToolBuild {
422
- compiler : self . compiler ,
423
- target : self . target ,
424
- tool : "remote-test-server" ,
425
- mode : Mode :: ToolStd ,
426
- path : "src/tools/remote-test-server" ,
427
- is_optional_tool : false ,
428
- source_type : SourceType :: InTree ,
429
- extra_features : Vec :: new ( ) ,
430
- } ) . expect ( "expected to build -- essential tool" )
431
- }
432
- }
433
-
434
397
#[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
435
398
pub struct Rustdoc {
436
399
/// This should only ever be 0 or 2.
@@ -659,23 +622,14 @@ impl<'a> Builder<'a> {
659
622
pub fn tool_cmd ( & self , tool : Tool ) -> Command {
660
623
let mut cmd = Command :: new ( self . tool_exe ( tool) ) ;
661
624
let compiler = self . compiler ( 0 , self . config . build ) ;
662
- self . prepare_tool_cmd ( compiler, tool, & mut cmd) ;
663
- cmd
664
- }
665
-
666
- /// Prepares the `cmd` provided to be able to run the `compiler` provided.
667
- ///
668
- /// Notably this munges the dynamic library lookup path to point to the
669
- /// right location to run `compiler`.
670
- fn prepare_tool_cmd ( & self , compiler : Compiler , tool : Tool , cmd : & mut Command ) {
671
625
let host = & compiler. host ;
626
+ // Prepares the `cmd` provided to be able to run the `compiler` provided.
627
+ //
628
+ // Notably this munges the dynamic library lookup path to point to the
629
+ // right location to run `compiler`.
672
630
let mut lib_paths: Vec < PathBuf > = vec ! [
673
- if compiler. stage == 0 {
674
- self . build. rustc_snapshot_libdir( )
675
- } else {
676
- PathBuf :: from( & self . sysroot_libdir( compiler, compiler. host) )
677
- } ,
678
- self . cargo_out( compiler, tool. get_mode( ) , * host) . join( "deps" ) ,
631
+ self . build. rustc_snapshot_libdir( ) ,
632
+ self . cargo_out( compiler, Mode :: ToolBootstrap , * host) . join( "deps" ) ,
679
633
] ;
680
634
681
635
// On MSVC a tool may invoke a C compiler (e.g., compiletest in run-make
@@ -696,6 +650,7 @@ impl<'a> Builder<'a> {
696
650
}
697
651
}
698
652
699
- add_lib_path ( lib_paths, cmd) ;
653
+ add_lib_path ( lib_paths, & mut cmd) ;
654
+ cmd
700
655
}
701
656
}
0 commit comments