Only keep old cg_gcc if the stamp file actually exists

This commit is contained in:
Jakub Beránek
2026-01-02 10:05:30 +01:00
parent 9b789f0bd0
commit 04707f4f86
@@ -1690,7 +1690,7 @@ fn run(self, builder: &Builder<'_>) -> Self::Output {
&CodegenBackendKind::Gcc,
);
if builder.config.keep_stage.contains(&build_compiler.stage) {
if builder.config.keep_stage.contains(&build_compiler.stage) && stamp.path().exists() {
trace!("`keep-stage` requested");
builder.info(
"WARNING: Using a potentially old codegen backend. \