print sysroot build failure error

This commit is contained in:
Ralf Jung 2022-12-28 17:18:03 +01:00
parent fba3d79df0
commit 4fa51925fa

View File

@ -137,9 +137,11 @@ pub fn setup(subcommand: &MiriCommand, target: &str, rustc_version: &VersionMeta
.rustflags(rustflags) .rustflags(rustflags)
.cargo(cargo_cmd) .cargo(cargo_cmd)
.build_from_source(&rust_src) .build_from_source(&rust_src)
.unwrap_or_else(|_| { .unwrap_or_else(|err| {
if only_setup { if print_sysroot {
show_error!("failed to build sysroot, see error details above") show_error!("failed to build sysroot")
} else if only_setup {
show_error!("failed to build sysroot: {err:?}")
} else { } else {
show_error!( show_error!(
"failed to build sysroot; run `cargo miri setup` to see the error details" "failed to build sysroot; run `cargo miri setup` to see the error details"