@@ -2736,60 +2736,50 @@ impl Step for Crate {
27362736pub struct CompilerBuiltins {
27372737 compiler : Compiler ,
27382738 target : TargetSelection ,
2739- mode : Mode ,
27402739}
27412740
27422741impl Step for CompilerBuiltins {
27432742 type Output = ( ) ;
27442743 const DEFAULT : bool = true ;
27452744
27462745 fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
2747- run. paths ( & [ "library/compiler-builtins" , "library/compiler-builtins/compiler-builtins" ] )
2746+ run. path ( "library/compiler-builtins" )
27482747 }
27492748
27502749 fn make_run ( run : RunConfig < ' _ > ) {
27512750 let builder = run. builder ;
27522751 let host = run. build_triple ( ) ;
2753- let compiler = builder. compiler_for ( builder. top_stage , host , host) ;
2752+ let compiler = builder. compiler ( builder. top_stage , host) ;
27542753
2755- builder. ensure ( CompilerBuiltins { compiler, target : run. target , mode : Mode :: Std } ) ;
2754+ builder. ensure ( CompilerBuiltins { compiler, target : run. target } ) ;
27562755 }
27572756
27582757 fn run ( self , builder : & Builder < ' _ > ) -> Self :: Output {
27592758 let compiler = self . compiler ;
27602759 let target = self . target ;
2761- let mode = self . mode ;
27622760
2763- builder. ensure ( compile:: Std :: new ( compiler, compiler. host ) . force_recompile ( true ) ) ;
2764- let compiler = builder. compiler_for ( compiler. stage , compiler. host , target) ;
2765-
2766- // Also prepare a sysroot for the target.
2767- if !builder. config . is_host_target ( target) {
2768- builder. ensure ( compile:: Std :: new ( compiler, target) . force_recompile ( true ) ) ;
2769- builder. ensure ( RemoteCopyLibs { compiler, target } ) ;
2770- }
2761+ builder. ensure ( compile:: Std :: new ( compiler, target) ) ;
27712762
27722763 let make_cargo = |f : fn ( & mut builder:: Cargo ) -> & mut builder:: Cargo | {
27732764 let mut c = builder:: Cargo :: new (
27742765 builder,
27752766 compiler,
2776- mode ,
2767+ Mode :: ToolStd ,
27772768 SourceType :: InTree ,
27782769 target,
27792770 Kind :: Test ,
27802771 ) ;
2772+ c. current_dir ( & builder. src . join ( "library" ) . join ( "compiler-builtins" ) ) ;
27812773 f ( & mut c) ;
27822774 c
27832775 } ;
27842776
27852777 // Most tests are in the builtins-test crate.
2786- let crates = [ "compiler-builtins " . to_string ( ) , "builtins-test" . to_string ( ) ] ;
2778+ let crates = [ "compiler_builtins " . to_string ( ) , "builtins-test" . to_string ( ) ] ;
27872779 let cargo = make_cargo ( |c| c) ;
2788- run_cargo_test ( cargo, & [ ] , & crates, "compiler-buitlins" , target, builder) ;
2789- let cargo = make_cargo ( |c| c. arg ( "--release" ) ) ;
2790- run_cargo_test ( cargo, & [ ] , & crates, "compiler-buitlins --release" , target, builder) ;
2780+ run_cargo_test ( cargo, & [ ] , & crates, "compiler-builtins" , target, builder) ;
27912781 let cargo = make_cargo ( |c| c. arg ( "--features=c" ) ) ;
2792- run_cargo_test ( cargo, & [ ] , & crates, "compiler-buitlins --features c" , target, builder) ;
2782+ run_cargo_test ( cargo, & [ ] , & crates, "compiler-builtins --features c" , target, builder) ;
27932783 }
27942784}
27952785
0 commit comments