diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 6984940b0a6f0..11463c1a056ec 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -85,6 +85,8 @@ impl Step for Rustc { let compiler = builder.compiler(0, builder.config.build); let target = self.target; + builder.ensure(Test { target }); + let mut cargo = builder.cargo(compiler, Mode::Rustc, target, "check"); rustc_cargo(builder, &mut cargo); @@ -132,8 +134,7 @@ impl Step for CodegenBackend { let target = self.target; let backend = self.backend; - let out_dir = builder.cargo_out(compiler, Mode::Codegen, target); - builder.clear_if_dirty(&out_dir, &librustc_stamp(builder, compiler, target)); + builder.ensure(Rustc { target }); let mut cargo = builder.cargo(compiler, Mode::Codegen, target, "check"); cargo.arg("--manifest-path").arg(builder.src.join("src/librustc_codegen_llvm/Cargo.toml")); @@ -173,6 +174,8 @@ impl Step for Test { let compiler = builder.compiler(0, builder.config.build); let target = self.target; + builder.ensure(Std { target }); + let mut cargo = builder.cargo(compiler, Mode::Test, target, "check"); test_cargo(builder, &compiler, target, &mut cargo); @@ -213,10 +216,7 @@ impl Step for Rustdoc { let compiler = builder.compiler(0, builder.config.build); let target = self.target; - let stage_out = builder.stage_out(compiler, Mode::ToolRustc); - builder.clear_if_dirty(&stage_out, &libstd_stamp(builder, compiler, target)); - builder.clear_if_dirty(&stage_out, &libtest_stamp(builder, compiler, target)); - builder.clear_if_dirty(&stage_out, &librustc_stamp(builder, compiler, target)); + builder.ensure(Rustc { target }); let mut cargo = prepare_tool_cargo(builder, compiler,