diff options
author | 2018-01-08 01:36:10 -0800 | |
---|---|---|
committer | 2018-01-08 01:37:42 -0800 | |
commit | 294c074fcd42ffb1154101f5156f5e9e121ab615 (patch) | |
tree | 5943091d1de60dfd83fb5a80deeee191b2900608 /src/main | |
parent | 6ab93a6048260671206622527c89192b1a86284b (diff) |
actions: don't add the server's TMPDIR to the env
The BazelConfiguration no longer adds the Bazel
server process' TMPDIR/TMP/TEMP environment
variables.
I added that code before having implemented always
creating a temp directory for actions:
https://github.com/bazelbuild/bazel/commit/cfccdf1f6e93125d894ff40e0ccecaf20cc20ef5
See https://github.com/bazelbuild/bazel/issues/4376
Change-Id: I8ba63d6120a0aa849997b274fb2d68ad50b2285c
PiperOrigin-RevId: 181134179
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java index 376ff19df6..00f2f9e4ea 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java @@ -144,27 +144,10 @@ public class BazelConfiguration extends Fragment { // TODO(ulfjack): Avoid using System.getenv; it's the wrong environment! builder.put("PATH", pathOrDefault(os, System.getenv("PATH"), getShellExecutable())); - // TODO(laszlocsomor): Remove setting TMP/TEMP here, and set a meaningful value just before - // executing the action. - // Setting TMP=null, TEMP=null has the effect of copying the client's TMP/TEMP to the action's - // environment. This is a short-term workaround to get temp-requiring actions working on - // Windows. Its detrimental effect is that the client's TMP/TEMP becomes part of the actions's - // key. Yet, we need this for now to build Android programs, because the Android BusyBox is - // written in Java and tries to create temp directories using - // java.nio.file.Files.createTempDirectory, which needs TMP or TEMP (or USERPROFILE) on - // Windows, otherwise they return c:\windows which is non-writable. - builder.put("TMP", null); - builder.put("TEMP", null); - String ldLibraryPath = System.getenv("LD_LIBRARY_PATH"); if (ldLibraryPath != null) { builder.put("LD_LIBRARY_PATH", ldLibraryPath); } - - String tmpdir = System.getenv("TMPDIR"); - if (tmpdir != null) { - builder.put("TMPDIR", tmpdir); - } } } |