Previously we'd attempt to recompile them and that would fail since
we've essentially not built the entire compiler yet, or we're faking
that fact. This commit should make us ignore the codegen backend build
as well.
Unlike the other compile steps, there is no CodegenBackendLink step that
we run here, because that is done later as a part of assembling the
final compiler and as an explicit function call.
builder.ensure(Rustc { compiler, target });
+ if let Some(keep_stage) = builder.config.keep_stage {
+ if keep_stage <= compiler.stage {
+ println!("Warning: Using a potentially old codegen backend. \
+ This may not behave well.");
+ // Codegen backends are linked separately from this step today, so we don't do
+ // anything here.
+ return;
+ }
+ }
+
if builder.force_use_stage1(compiler, target) {
builder.ensure(CodegenBackend {
compiler: builder.compiler(1, builder.config.build),