Skip to content

Commit

Permalink
Rollup merge of #84940 - jyn514:ninja, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Don't run sanity checks for `x.py setup`

These requirements change as soon as the command finishes running, and
`setup` doesn't build anything, so the check doesn't make sense.

Previously, `x.py setup` would give hard errors if `ninja` and `cmake`
were not installed, even if the new profile didn't require them.

Fixes #84938.
  • Loading branch information
GuillaumeGomez authored Jun 6, 2021
2 parents 85fec06 + 3aefd77 commit 83664bd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,13 @@ impl Build {

build.verbose("finding compilers");
cc_detect::find(&mut build);
build.verbose("running sanity check");
sanity::check(&mut build);
// When running `setup`, the profile is about to change, so any requirements we have now may
// be different on the next invocation. Don't check for them until the next time x.py is
// run. This is ok because `setup` never runs any build commands, so it won't fail if commands are missing.
if !matches!(build.config.cmd, Subcommand::Setup { .. }) {
build.verbose("running sanity check");
sanity::check(&mut build);
}

// If local-rust is the same major.minor as the current version, then force a
// local-rebuild
Expand Down

0 comments on commit 83664bd

Please sign in to comment.