diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2020-07-29 13:55:34 -0700 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2020-08-26 14:57:11 -0700 |
| commit | bb39f3555c14275472386ffca637071e22714521 (patch) | |
| tree | 7cbb08321a903d220ffb5ceb7038a45f72ca8f46 /src | |
| parent | 6149dffff959c0c338ef319b4cea2f49560041e7 (diff) | |
| download | rust-bb39f3555c14275472386ffca637071e22714521.tar.gz rust-bb39f3555c14275472386ffca637071e22714521.zip | |
Provide a better diagnostic if ninja isn't installed
Let people know that they can set ninja=false if they don't want to install ninja.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/sanity.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index f89bef50de9..533b5c79777 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -100,8 +100,16 @@ pub fn check(build: &mut Build) { if build.config.ninja { // Some Linux distros rename `ninja` to `ninja-build`. // CMake can work with either binary name. - if cmd_finder.maybe_have("ninja-build").is_none() { - cmd_finder.must_have("ninja"); + if cmd_finder.maybe_have("ninja-build").is_none() + && cmd_finder.maybe_have("ninja").is_none() + { + eprintln!( + " +Couldn't find required command: ninja +You should install ninja, or set ninja=false in config.toml +" + ); + std::process::exit(1); } } |
