@@ -1610,7 +1610,7 @@ impl Step for GccCodegenBackend {
1610
1610
let _guard = builder. msg_rustc_tool (
1611
1611
Kind :: Build ,
1612
1612
build_compiler. stage ,
1613
- format_args ! ( "codegen backend gcc" ) ,
1613
+ "codegen backend gcc" ,
1614
1614
build_compiler. host ,
1615
1615
target,
1616
1616
) ;
@@ -1694,7 +1694,7 @@ impl Step for CraneliftCodegenBackend {
1694
1694
let _guard = builder. msg_rustc_tool (
1695
1695
Kind :: Build ,
1696
1696
build_compiler. stage ,
1697
- format_args ! ( "codegen backend cranelift" ) ,
1697
+ "codegen backend cranelift" ,
1698
1698
build_compiler. host ,
1699
1699
target,
1700
1700
) ;
@@ -1716,32 +1716,28 @@ fn write_codegen_backend_stamp(
1716
1716
files : Vec < PathBuf > ,
1717
1717
dry_run : bool ,
1718
1718
) -> BuildStamp {
1719
- if !dry_run {
1720
- let mut files = files. into_iter ( ) . filter ( |f| {
1721
- let filename = f. file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ;
1722
- is_dylib ( f) && filename. contains ( "rustc_codegen_" )
1723
- } ) ;
1724
- let codegen_backend = match files. next ( ) {
1725
- Some ( f) => f,
1726
- None => panic ! ( "no dylibs built for codegen backend?" ) ,
1727
- } ;
1728
- if let Some ( f) = files. next ( ) {
1729
- panic ! (
1730
- "codegen backend built two dylibs:\n {}\n {}" ,
1731
- codegen_backend. display( ) ,
1732
- f. display( )
1733
- ) ;
1734
- }
1719
+ if dry_run {
1720
+ return stamp;
1721
+ }
1735
1722
1736
- let codegen_backend = codegen_backend. to_str ( ) . unwrap ( ) ;
1737
- stamp = stamp. add_stamp ( codegen_backend) ;
1738
- t ! ( stamp. write( ) ) ;
1723
+ let mut files = files. into_iter ( ) . filter ( |f| {
1724
+ let filename = f. file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ;
1725
+ is_dylib ( f) && filename. contains ( "rustc_codegen_" )
1726
+ } ) ;
1727
+ let codegen_backend = match files. next ( ) {
1728
+ Some ( f) => f,
1729
+ None => panic ! ( "no dylibs built for codegen backend?" ) ,
1730
+ } ;
1731
+ if let Some ( f) = files. next ( ) {
1732
+ panic ! ( "codegen backend built two dylibs:\n {}\n {}" , codegen_backend. display( ) , f. display( ) ) ;
1739
1733
}
1734
+
1735
+ let codegen_backend = codegen_backend. to_str ( ) . unwrap ( ) ;
1736
+ stamp = stamp. add_stamp ( codegen_backend) ;
1737
+ t ! ( stamp. write( ) ) ;
1740
1738
stamp
1741
1739
}
1742
1740
1743
- pub ( crate ) const CODEGEN_BACKEND_PREFIX : & str = "rustc_codegen_" ;
1744
-
1745
1741
/// Creates the `codegen-backends` folder for a compiler that's about to be
1746
1742
/// assembled as a complete compiler.
1747
1743
///
0 commit comments