Skip to content

Commit 905f5fa

Browse files
authored
Merge pull request #3034 from jyn514/revert-2958-jnelson/set-rustc-env
Revert "Set RUSTC and RUSTDOC env for child processes run through the proxy"
2 parents 727167a + 25f1dd5 commit 905f5fa

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/toolchain.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -401,19 +401,6 @@ impl<'a> InstalledCommonToolchain<'a> {
401401

402402
cmd.env("RUSTUP_TOOLCHAIN", &self.0.name);
403403
cmd.env("RUSTUP_HOME", &self.0.cfg.rustup_dir);
404-
// It's valid (although slightly cursed) to tell a rustup cargo proxy to use a custom rustc
405-
// from a different toolchain.
406-
if env::var("RUSTC").is_err() {
407-
// Set RUSTC for the spawned binary. This serves two purposes:
408-
// 1. It avoids the overhead of having to re-parse `settings.toml` on each proxy.
409-
// In projects with many crates, this can have non-trivial overhead.
410-
// 2. For build scripts, it provides an absolute path for RUSTC rather than forcing them to look it up in PATH.
411-
// This allows them to find the sysroot path for the toolchain, rather than ending up somewhere in CARGO_HOME.
412-
cmd.env("RUSTC", self.0.path.join("bin").join("rustc"));
413-
}
414-
if env::var("RUSTDOC").is_err() {
415-
cmd.env("RUSTDOC", self.0.path.join("bin").join("rustdoc"));
416-
}
417404
}
418405

419406
fn set_ldpath(&self, cmd: &mut Command) {

0 commit comments

Comments
 (0)