diff options
author | 2018-02-13 03:48:00 -0800 | |
---|---|---|
committer | 2018-02-13 03:50:22 -0800 | |
commit | 04757dba0174d22c0a695a7ed5fe511fd13df008 (patch) | |
tree | 92d9405e4787123fdbcc0d0d8e2f7fe72ab7204c /src/main/java/com/google/devtools/build/lib/exec/local/LocalExecutionOptions.java | |
parent | 6496b1d1d25025f33406b1eaf9949cab126f08bd (diff) |
tmpdir,local-exec: implement --local_tmp_root
Add new flag called `--local_tmp_root`, which (if
specified) tells Bazel what temp directory should
locally executed actions use.
Fixes https://github.com/bazelbuild/bazel/issues/4621
Related to https://github.com/bazelbuild/bazel/issues/3215
RELNOTES[NEW]: The new "--local_tmp_root=<path>" flag allows specifying the temp directory for locally executed actions.
Change-Id: Ice69a5e63d0bf4d3b5c9ef4dbdd1ed1c5025f85e
PiperOrigin-RevId: 185509555
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/exec/local/LocalExecutionOptions.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/exec/local/LocalExecutionOptions.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/exec/local/LocalExecutionOptions.java b/src/main/java/com/google/devtools/build/lib/exec/local/LocalExecutionOptions.java index 08aaa53e33..dfcd5d06d8 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/local/LocalExecutionOptions.java +++ b/src/main/java/com/google/devtools/build/lib/exec/local/LocalExecutionOptions.java @@ -60,4 +60,21 @@ public class LocalExecutionOptions extends OptionsBase { + "locally executed actions which don't use sandboxing" ) public boolean collectLocalExecutionStatistics; + + @Option( + name = "local_tmp_root", + defaultValue = "", + documentationCategory = OptionDocumentationCategory.EXECUTION_STRATEGY, + effectTags = {OptionEffectTag.EXECUTION}, + help = + "Sets the TMPDIR environment variable's value for locally executed actions. If this flag's " + + "value is not empty, Bazel exports TMPDIR (on Linux/macOS) or TMP and TEMP (on " + + "Windows) with this value for locally executed actions. (This doesn't influence " + + "action caching, as TMPDIR/TMP/TEMP are not part of the action's cache key.) If this " + + "flag's value is empty, then Bazel picks up the user-defined TMPDIR (on Linux/macOS) " + + "or TMP/TEMP (on Windows) and exports that for local actions; and if that value is " + + "also empty, Bazel exports \"/tmp\" (on Linux/macOS) or a directory in the execroot " + + "(on Windows)." + ) + public String localTmpRoot; } |