@@ -1610,7 +1610,7 @@ impl Step for GccCodegenBackend {
16101610 let _guard = builder. msg_rustc_tool (
16111611 Kind :: Build ,
16121612 build_compiler. stage ,
1613- format_args ! ( "codegen backend gcc" ) ,
1613+ "codegen backend gcc" ,
16141614 build_compiler. host ,
16151615 target,
16161616 ) ;
@@ -1694,7 +1694,7 @@ impl Step for CraneliftCodegenBackend {
16941694 let _guard = builder. msg_rustc_tool (
16951695 Kind :: Build ,
16961696 build_compiler. stage ,
1697- format_args ! ( "codegen backend cranelift" ) ,
1697+ "codegen backend cranelift" ,
16981698 build_compiler. host ,
16991699 target,
17001700 ) ;
@@ -1716,32 +1716,28 @@ fn write_codegen_backend_stamp(
17161716 files : Vec < PathBuf > ,
17171717 dry_run : bool ,
17181718) -> 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+ }
17351722
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( ) ) ;
17391733 }
1734+
1735+ let codegen_backend = codegen_backend. to_str ( ) . unwrap ( ) ;
1736+ stamp = stamp. add_stamp ( codegen_backend) ;
1737+ t ! ( stamp. write( ) ) ;
17401738 stamp
17411739}
17421740
1743- pub ( crate ) const CODEGEN_BACKEND_PREFIX : & str = "rustc_codegen_" ;
1744-
17451741/// Creates the `codegen-backends` folder for a compiler that's about to be
17461742/// assembled as a complete compiler.
17471743///
0 commit comments