Skip to content

Commit a8b2da3

Browse files
bootstrap: Allow for invoking *cargo rustc*
1 parent 852bef9 commit a8b2da3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bootstrap/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ impl<'a> Builder<'a> {
658658
if let Some(ref error_format) = self.config.rustc_error_format {
659659
cargo.env("RUSTC_ERROR_FORMAT", error_format);
660660
}
661-
if cmd != "build" && cmd != "check" && want_rustdoc {
661+
if cmd != "build" && cmd != "check" && cmd != "rustc" && want_rustdoc {
662662
cargo.env("RUSTDOC_LIBDIR", self.rustc_libdir(self.compiler(2, self.config.build)));
663663
}
664664

@@ -804,7 +804,7 @@ impl<'a> Builder<'a> {
804804
}
805805
}
806806

807-
if cmd == "build" && mode == Mode::Libstd
807+
if (cmd == "build" || cmd == "rustc") && mode == Mode::Libstd
808808
&& self.config.extended && compiler.is_final_stage(self)
809809
{
810810
cargo.env("RUSTC_SAVE_ANALYSIS", "api".to_string());

0 commit comments

Comments
 (0)