Skip to content

Commit

Permalink
fail on {dist, install} subcommand if download-rustc is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
onur-ozkan committed Oct 8, 2024
1 parent a3bb170 commit b0b4f4a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/bootstrap/src/core/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,15 @@ impl StepDescription {
.map(|desc| (desc.should_run)(ShouldRun::new(builder, desc.kind)))
.collect::<Vec<_>>();

if builder.download_rustc() && (builder.kind == Kind::Dist || builder.kind == Kind::Install)
{
eprintln!(
"ERROR: '{}' subcommand is incompatible with `rust.download-rustc`.",
builder.kind.as_str()
);
crate::exit!(1);
}

// sanity checks on rules
for (desc, should_run) in v.iter().zip(&should_runs) {
assert!(
Expand Down

0 comments on commit b0b4f4a

Please sign in to comment.