diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index cc501d6f9ba72..b9c82127342fd 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -310,7 +310,8 @@ impl<'a> Builder<'a> { tool::Compiletest, tool::RemoteTestServer, tool::RemoteTestClient, tool::RustInstaller, tool::Cargo, tool::Rls, tool::Rustdoc, tool::Clippy, native::Llvm, tool::Rustfmt, tool::Miri, native::Lld), - Kind::Check => describe!(check::Std, check::Test, check::Rustc, check::CodegenBackend, check::Rustdoc), + Kind::Check => describe!(check::Std, check::Test, check::Rustc, check::CodegenBackend, + check::Rustdoc), Kind::Test => describe!(test::Tidy, test::Bootstrap, test::Ui, test::RunPass, test::CompileFail, test::ParseFail, test::RunFail, test::RunPassValgrind, test::MirOpt, test::Codegen, test::CodegenUnits, test::Incremental, test::Debuginfo, diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 4c84be4ed2ea5..64354ae29aa24 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -12,7 +12,7 @@ use compile::{run_cargo, std_cargo, test_cargo, rustc_cargo, rustc_cargo_env, add_to_sysroot}; use builder::{RunConfig, Builder, ShouldRun, Step}; -use tool::prepare_tool_cargo; +use tool::{self, prepare_tool_cargo}; use {Compiler, Mode}; use cache::{INTERNER, Interned}; use std::path::PathBuf; @@ -232,6 +232,12 @@ impl Step for Rustdoc { let libdir = builder.sysroot_libdir(compiler, target); add_to_sysroot(&builder, &libdir, &rustdoc_stamp(builder, compiler, target)); + + builder.ensure(tool::CleanTools { + compiler, + target, + mode: Mode::Tool, + }); } }