Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,8 @@ impl Step for Rls {
let rls = builder.ensure(tool::Rls {
compiler: builder.compiler(stage, build.build),
target
}).expect("Rls to build: toolstate is testing");
}).or_else(|| { println!("Unable to build RLS, skipping dist"); None })?;

install(&rls, &image.join("bin"), 0o755);
let doc = image.join("share/doc/rls");
install(&src.join("README.md"), &doc, 0o644);
Expand Down Expand Up @@ -1167,11 +1168,12 @@ impl Step for Rustfmt {
let rustfmt = builder.ensure(tool::Rustfmt {
compiler: builder.compiler(stage, build.build),
target
}).expect("Rustfmt to build: toolstate is testing");
}).or_else(|| { println!("Unable to build Rustfmt, skipping dist"); None })?;
let cargofmt = builder.ensure(tool::Cargofmt {
compiler: builder.compiler(stage, build.build),
target
}).expect("Cargofmt to build: toolstate is testing");
}).or_else(|| { println!("Unable to build Cargofmt, skipping dist"); None })?;

install(&rustfmt, &image.join("bin"), 0o755);
install(&cargofmt, &image.join("bin"), 0o755);
let doc = image.join("share/doc/rustfmt");
Expand Down
11 changes: 9 additions & 2 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use std::fs;
use std::env;
use std::path::PathBuf;
use std::process::Command;
use std::process::{Command, exit};

use Mode;
use Compiler;
Expand Down Expand Up @@ -115,7 +115,14 @@ impl Step for ToolBuild {
println!("Building stage{} tool {} ({})", compiler.stage, tool, target);

let mut cargo = prepare_tool_cargo(builder, compiler, target, "build", path);
build.run_expecting(&mut cargo, expectation);
if !build.try_run(&mut cargo, expectation) {
if expectation == BuildExpectation::None {
exit(1);
} else {
return None;
}
}

if expectation == BuildExpectation::Succeeding || expectation == BuildExpectation::None {
let cargo_out = build.cargo_out(compiler, Mode::Tool, target)
.join(exe(tool, &compiler.host));
Expand Down