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