File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -1705,6 +1705,13 @@ impl Step for CodegenBackend {
1705
1705
let codegen_backend = codegen_backend. to_str ( ) . unwrap ( ) ;
1706
1706
t ! ( stamp. add_stamp( codegen_backend) . write( ) ) ;
1707
1707
}
1708
+
1709
+ fn metadata ( & self ) -> Option < StepMetadata > {
1710
+ Some (
1711
+ StepMetadata :: build ( & format ! ( "rustc_codegen_{}" , self . backend) , self . target )
1712
+ . built_by ( self . compiler ) ,
1713
+ )
1714
+ }
1708
1715
}
1709
1716
1710
1717
/// Creates the `codegen-backends` folder for a compiler that's about to be
Original file line number Diff line number Diff line change @@ -719,6 +719,26 @@ mod snapshot {
719
719
" ) ;
720
720
}
721
721
722
+ #[ test]
723
+ fn build_compiler_codegen_backend ( ) {
724
+ let ctx = TestCtx :: new ( ) ;
725
+ insta:: assert_snapshot!(
726
+ ctx
727
+ . config( "build" )
728
+ . args( & [ "--set" , "rust.codegen-backends=['llvm', 'cranelift']" ] )
729
+ . render_steps( ) , @r"
730
+ [build] llvm <host>
731
+ [build] rustc 0 <host> -> rustc 1 <host>
732
+ [build] rustc 0 <host> -> rustc_codegen_cranelift 1 <host>
733
+ [build] rustc 1 <host> -> std 1 <host>
734
+ [build] rustc 1 <host> -> std 1 <host>
735
+ [build] rustc 1 <host> -> rustc 2 <host>
736
+ [build] rustc 1 <host> -> rustc_codegen_cranelift 2 <host>
737
+ [build] rustdoc 1 <host>
738
+ "
739
+ ) ;
740
+ }
741
+
722
742
#[ test]
723
743
fn build_compiler_tools ( ) {
724
744
let ctx = TestCtx :: new ( ) ;
You can’t perform that action at this time.
0 commit comments