Skip to content

Commit 57b54c4

Browse files
committed
Use the built cargo for cargotest.
1 parent a37c32e commit 57b54c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bootstrap/test.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ impl Step for Cargotest {
154154
fn run(self, builder: &Builder<'_>) {
155155
let compiler = builder.compiler(self.stage, self.host);
156156
builder.ensure(compile::Rustc { compiler, target: compiler.host });
157+
let cargo = builder.ensure(tool::Cargo { compiler, target: compiler.host });
157158

158159
// Note that this is a short, cryptic, and not scoped directory name. This
159160
// is currently to minimize the length of path on Windows where we otherwise
@@ -165,7 +166,7 @@ impl Step for Cargotest {
165166
let mut cmd = builder.tool_cmd(Tool::CargoTest);
166167
try_run(
167168
builder,
168-
cmd.arg(&builder.initial_cargo)
169+
cmd.arg(&cargo)
169170
.arg(&out_dir)
170171
.env("RUSTC", builder.rustc(compiler))
171172
.env("RUSTDOC", builder.rustdoc(compiler)),

0 commit comments

Comments
 (0)