about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2024-06-09 14:13:38 +0000
committer许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2024-06-11 08:21:10 +0000
commit7255c2825df1b6497dea1d689173a62ea872244f (patch)
treec9ddf1dedff7958e21ea4eda1da1e6cf47711cd2
parentaec67e238d366c4c41373b272f19dd79ff5ec0f0 (diff)
downloadrust-7255c2825df1b6497dea1d689173a62ea872244f.tar.gz
rust-7255c2825df1b6497dea1d689173a62ea872244f.zip
run-make-support: remove `env_var`
This is incorrectly named (it's actually `env_clear`), and is itself
a gigantic footgun: removing `TMPDIR` on Unix and `TMP`/`TEMP` on
Windows basically wrecks anything that relies on `std::env::temp_dir`
from functioning correctly. For example, this includes rustc's codegen.
-rw-r--r--src/tools/run-make-support/src/lib.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs
index cea1313e29d..93e41b593d1 100644
--- a/src/tools/run-make-support/src/lib.rs
+++ b/src/tools/run-make-support/src/lib.rs
@@ -364,12 +364,6 @@ macro_rules! impl_common_helpers {
                 self
             }
 
-            /// Clear all environmental variables.
-            pub fn env_var(&mut self) -> &mut Self {
-                self.cmd.env_clear();
-                self
-            }
-
             /// Generic command argument provider. Prefer specific helper methods if possible.
             /// Note that for some executables, arguments might be platform specific. For C/C++
             /// compilers, arguments might be platform *and* compiler specific.