@@ -2736,60 +2736,50 @@ impl Step for Crate {
2736
2736
pub struct CompilerBuiltins {
2737
2737
compiler : Compiler ,
2738
2738
target : TargetSelection ,
2739
- mode : Mode ,
2740
2739
}
2741
2740
2742
2741
impl Step for CompilerBuiltins {
2743
2742
type Output = ( ) ;
2744
2743
const DEFAULT : bool = true ;
2745
2744
2746
2745
fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
2747
- run. paths ( & [ "library/compiler-builtins" , "library/compiler-builtins/compiler-builtins" ] )
2746
+ run. path ( "library/compiler-builtins" )
2748
2747
}
2749
2748
2750
2749
fn make_run ( run : RunConfig < ' _ > ) {
2751
2750
let builder = run. builder ;
2752
2751
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) ;
2754
2753
2755
- builder. ensure ( CompilerBuiltins { compiler, target : run. target , mode : Mode :: Std } ) ;
2754
+ builder. ensure ( CompilerBuiltins { compiler, target : run. target } ) ;
2756
2755
}
2757
2756
2758
2757
fn run ( self , builder : & Builder < ' _ > ) -> Self :: Output {
2759
2758
let compiler = self . compiler ;
2760
2759
let target = self . target ;
2761
- let mode = self . mode ;
2762
2760
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) ) ;
2771
2762
2772
2763
let make_cargo = |f : fn ( & mut builder:: Cargo ) -> & mut builder:: Cargo | {
2773
2764
let mut c = builder:: Cargo :: new (
2774
2765
builder,
2775
2766
compiler,
2776
- mode ,
2767
+ Mode :: ToolStd ,
2777
2768
SourceType :: InTree ,
2778
2769
target,
2779
2770
Kind :: Test ,
2780
2771
) ;
2772
+ c. current_dir ( & builder. src . join ( "library" ) . join ( "compiler-builtins" ) ) ;
2781
2773
f ( & mut c) ;
2782
2774
c
2783
2775
} ;
2784
2776
2785
2777
// 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 ( ) ] ;
2787
2779
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) ;
2791
2781
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) ;
2793
2783
}
2794
2784
}
2795
2785
0 commit comments