Skip to content

Commit

Permalink
nit: rearrange and make match exhaustive
Browse files Browse the repository at this point in the history
also indicate difference between out_dir and my_out
  • Loading branch information
collin5 authored and Mark-Simulacrum committed Sep 12, 2018
1 parent 86e34cd commit de3ec8d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/bootstrap/builder.rs
Expand Up @@ -709,6 +709,7 @@ impl<'a> Builder<'a> {
let mut cargo = Command::new(&self.initial_cargo);
let out_dir = self.stage_out(compiler, mode);

// command specific path, we call clear_if_dirty with this
let mut my_out = match cmd {
"build" => self.cargo_out(compiler, mode, target),

Expand Down Expand Up @@ -754,20 +755,22 @@ impl<'a> Builder<'a> {
Mode::Std => {
self.clear_if_dirty(&my_out, &self.rustc(compiler));
},
Mode::Test => {
self.clear_if_dirty(&my_out, &libstd_stamp);
},
Mode::Rustc => {
self.clear_if_dirty(&my_out, &self.rustc(compiler));
self.clear_if_dirty(&my_out, &libstd_stamp);
self.clear_if_dirty(&my_out, &libtest_stamp);
},
Mode::Test => {
self.clear_if_dirty(&my_out, &libstd_stamp);
},
Mode::Codegen => { },
Mode::ToolStd => { },
Mode::ToolTest => { },
Mode::ToolRustc => {
self.clear_if_dirty(&my_out, &libstd_stamp);
self.clear_if_dirty(&my_out, &libtest_stamp);
self.clear_if_dirty(&my_out, &librustc_stamp);
}
_ => { }
},
}
}

Expand Down

0 comments on commit de3ec8d

Please sign in to comment.