@@ -1606,7 +1606,7 @@ impl Step for GccCodegenBackend {
16061606 let _guard = builder.msg_rustc_tool(
16071607 Kind::Build,
16081608 build_compiler.stage,
1609- format_args!( "codegen backend gcc") ,
1609+ "codegen backend gcc",
16101610 build_compiler.host,
16111611 target,
16121612 );
@@ -1690,7 +1690,7 @@ impl Step for CraneliftCodegenBackend {
16901690 let _guard = builder.msg_rustc_tool(
16911691 Kind::Build,
16921692 build_compiler.stage,
1693- format_args!( "codegen backend cranelift") ,
1693+ "codegen backend cranelift",
16941694 build_compiler.host,
16951695 target,
16961696 );
@@ -1712,32 +1712,28 @@ fn write_codegen_backend_stamp(
17121712 files: Vec<PathBuf>,
17131713 dry_run: bool,
17141714) -> 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+ }
17311718
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());
17351729 }
1730+
1731+ let codegen_backend = codegen_backend.to_str().unwrap();
1732+ stamp = stamp.add_stamp(codegen_backend);
1733+ t!(stamp.write());
17361734 stamp
17371735}
17381736
1739- pub(crate) const CODEGEN_BACKEND_PREFIX: &str = "rustc_codegen_";
1740-
17411737/// Creates the `codegen-backends` folder for a compiler that's about to be
17421738/// assembled as a complete compiler.
17431739///
0 commit comments