Skip to content

Commit

Permalink
Rollup merge of rust-lang#55867 - RalfJung:dont-panic, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
do not panic just because cargo failed

Currently, a rustc ICE during bootstrap shows *two* backtraces with `RUST_BACKTRACE`. Fix that by making bootstrap just exit when cargo fails. This matches what we do [when building a tool fails](https://github.com/rust-lang/rust/blob/master/src/bootstrap/tool.rs#L189) and [when other stuff (not called through `stream_cargo`, like `cargo test`) fails](https://github.com/rust-lang/rust/blob/master/src/build_helper/lib.rs#L43).

Fixes rust-lang#53379
  • Loading branch information
kennytm authored Nov 17, 2018
2 parents 3556d98 + b7c319c commit 95795ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use std::fs::{self, File};
use std::io::BufReader;
use std::io::prelude::*;
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
use std::process::{Command, Stdio, exit};
use std::str;

use build_helper::{output, mtime, up_to_date};
Expand Down Expand Up @@ -1098,7 +1098,7 @@ pub fn run_cargo(builder: &Builder,
});

if !ok {
panic!("cargo must succeed");
exit(1);
}

// Ok now we need to actually find all the files listed in `toplevel`. We've
Expand Down

0 comments on commit 95795ca

Please sign in to comment.