Skip to content

Commit e6da40c

Browse files
committed
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.
1 parent 1807f27 commit e6da40c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/bootstrap/check.rs

+10-4
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,11 @@ impl Step for Rls {
246246
let compiler = builder.compiler(stage, host);
247247

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

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

293296
builder.ensure(tool::Rustfmt { compiler, target: self.host });
294-
let mut cargo = builder.cargo(compiler, Mode::Tool, host, "test");
295-
cargo.arg("--manifest-path").arg(build.src.join("src/tools/rustfmt/Cargo.toml"));
297+
let mut cargo = tool::prepare_tool_cargo(builder,
298+
compiler,
299+
host,
300+
"test",
301+
"src/tools/rustfmt");
296302

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

0 commit comments

Comments
 (0)