Skip to content

Commit

Permalink
Rollup merge of rust-lang#45236 - alexcrichton:build-less, r=Mark-Sim…
Browse files Browse the repository at this point in the history
…ulacrum

rustbuild: Prevent spurious rebuilds of the RLS

The RLS currently is rebuilt every time you test it because the `OPENSSL_DIR`
env var is changing, which is in turn caused by an accidental omission of
`prepare_tool_cargo` when testing the RLS.
  • Loading branch information
kennytm authored Oct 13, 2017
2 parents 2a6a4e7 + e6da40c commit 4ed348e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,11 @@ impl Step for Rls {
let compiler = builder.compiler(stage, host);

builder.ensure(tool::Rls { compiler, target: self.host });
let mut cargo = builder.cargo(compiler, Mode::Tool, host, "test");
cargo.arg("--manifest-path").arg(build.src.join("src/tools/rls/Cargo.toml"));
let mut cargo = tool::prepare_tool_cargo(builder,
compiler,
host,
"test",
"src/tools/rls");

// Don't build tests dynamically, just a pain to work with
cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
Expand Down Expand Up @@ -291,8 +294,11 @@ impl Step for Rustfmt {
let compiler = builder.compiler(stage, host);

builder.ensure(tool::Rustfmt { compiler, target: self.host });
let mut cargo = builder.cargo(compiler, Mode::Tool, host, "test");
cargo.arg("--manifest-path").arg(build.src.join("src/tools/rustfmt/Cargo.toml"));
let mut cargo = tool::prepare_tool_cargo(builder,
compiler,
host,
"test",
"src/tools/rustfmt");

// Don't build tests dynamically, just a pain to work with
cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
Expand Down

0 comments on commit 4ed348e

Please sign in to comment.