SIGN IN SIGN UP

fix(compilation): Preventing OUT_DIR env var from leaking into cargo run after build.rs run (#17503)

### What does this PR try to resolve?

closes #17456

Fix:
```rust
if k == "OUT_DIR" && !tool_kind.is_rustc_tool() {
    continue;
}
```
If this feels like a cheap hack please suggest me how should I proceed.
I took this approach to keep diff minimal and simple but may not be the
most scalable approach.

### How to test and review this PR?

Run `cargo test --test testsuite -- run::cargo_run_does_not_leak_out_dir
`
R
Ross Sullivan committed
4416a6628e4db15c062bcd4d30889ce70c963916
Committed by GitHub <noreply@github.com> on 9/25/2026, 5:30:11 PM