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
No known key found for this signature in database
GPG key ID: 909CD0D26483516B

View file

@ -1690,7 +1690,7 @@ impl Step for GccCodegenBackend {
&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. \