Skip to content

Commit de3ec8d

Browse files
collin5Mark-Simulacrum
authored andcommitted
nit: rearrange and make match exhaustive
also indicate difference between out_dir and my_out
1 parent 86e34cd commit de3ec8d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/bootstrap/builder.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ impl<'a> Builder<'a> {
709709
let mut cargo = Command::new(&self.initial_cargo);
710710
let out_dir = self.stage_out(compiler, mode);
711711

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

@@ -754,20 +755,22 @@ impl<'a> Builder<'a> {
754755
Mode::Std => {
755756
self.clear_if_dirty(&my_out, &self.rustc(compiler));
756757
},
758+
Mode::Test => {
759+
self.clear_if_dirty(&my_out, &libstd_stamp);
760+
},
757761
Mode::Rustc => {
758762
self.clear_if_dirty(&my_out, &self.rustc(compiler));
759763
self.clear_if_dirty(&my_out, &libstd_stamp);
760764
self.clear_if_dirty(&my_out, &libtest_stamp);
761765
},
762-
Mode::Test => {
763-
self.clear_if_dirty(&my_out, &libstd_stamp);
764-
},
766+
Mode::Codegen => { },
767+
Mode::ToolStd => { },
768+
Mode::ToolTest => { },
765769
Mode::ToolRustc => {
766770
self.clear_if_dirty(&my_out, &libstd_stamp);
767771
self.clear_if_dirty(&my_out, &libtest_stamp);
768772
self.clear_if_dirty(&my_out, &librustc_stamp);
769-
}
770-
_ => { }
773+
},
771774
}
772775
}
773776

0 commit comments

Comments
 (0)