use cache::Interned;
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-struct CleanTools {
- compiler: Compiler,
- target: Interned<String>,
- mode: Mode,
+pub struct CleanTools {
+ pub compiler: Compiler,
+ pub target: Interned<String>,
+ pub mode: Mode,
}
impl Step for CleanTools {
let target = self.target;
let tool = self.tool;
- builder.ensure(CleanTools { compiler, target, mode: self.mode });
match self.mode {
Mode::Libstd => builder.ensure(compile::Std { compiler, target }),
Mode::Libtest => builder.ensure(compile::Test { compiler, target }),
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Rustdoc {
- pub target_compiler: Compiler,
+ pub host: Interned<String>,
}
impl Step for Rustdoc {
fn make_run(run: RunConfig) {
run.builder.ensure(Rustdoc {
- target_compiler: run.builder.compiler(run.builder.top_stage, run.host),
+ host: run.host,
});
}
fn run(self, builder: &Builder) -> PathBuf {
let build = builder.build;
- let target_compiler = self.target_compiler;
+ let target_compiler = builder.compiler(builder.top_stage, self.host);
let target = target_compiler.host;
let build_compiler = if target_compiler.stage == 0 {
builder.compiler(0, builder.build.build)
builder.compiler(target_compiler.stage - 1, builder.build.build)
};
- builder.ensure(CleanTools { compiler: build_compiler, target, mode: Mode::Librustc });
builder.ensure(compile::Rustc { compiler: build_compiler, target });
let _folder = build.fold_output(|| format!("stage{}-rustdoc", target_compiler.stage));