Skip to content

Commit 9c766ad

Browse files
Set CARGO_WORKSPACE_DIR directly in prepare_tool_cargo
cf. rust-lang#99444 (comment) cf. rust-analyzer/expect-test#33
1 parent 4f37325 commit 9c766ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/bootstrap/tool.rs

+4
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ pub fn prepare_tool_cargo(
250250
}
251251
}
252252

253+
// cargo doesn't set this env var yet, but it's needed by expect-test
254+
// to build correct absolute paths for test_data files
255+
cargo.env("CARGO_WORKSPACE_DIR", &dir);
256+
253257
// clippy tests need to know about the stage sysroot. Set them consistently while building to
254258
// avoid rebuilding when running tests.
255259
cargo.env("SYSROOT", builder.sysroot(compiler));

0 commit comments

Comments
 (0)