diff options
author | 2016-06-21 12:04:34 +0000 | |
---|---|---|
committer | 2016-06-21 12:24:19 +0000 | |
commit | a148b4c25a7e343eac6a9a972f482711f8bef944 (patch) | |
tree | da63f4fb5871d974096a2f37d432af393c2a45ba /src/main/java/com/google/devtools/build/lib/analysis/SymlinkTreeAction.java | |
parent | 83131623f73bde31ba51f4ceda7fa601a5b122c3 (diff) |
Disable runfiles on Windows.
This adds a new configuration option that allows disabling the creation of symlink forest for runfiles.
On Windows, symlink forest is disabled by default; only the runfiles manifest is created.
For shell tests, a function 'rlocation' is provided that converts from runfiles location to a real location.
Work towards #1212.
--
MOS_MIGRATED_REVID=125439553
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/SymlinkTreeAction.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/SymlinkTreeAction.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/SymlinkTreeAction.java b/src/main/java/com/google/devtools/build/lib/analysis/SymlinkTreeAction.java index 5ebe26f0eb..ef2fde933e 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/SymlinkTreeAction.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/SymlinkTreeAction.java @@ -43,11 +43,11 @@ public final class SymlinkTreeAction extends AbstractAction { private final boolean filesetTree; private final PathFragment shExecutable; private final ImmutableMap<String, String> shellEnviroment; + private final boolean enableRunfiles; /** * Creates SymlinkTreeAction instance. - * - * @param owner action owner + * @param owner action owner * @param inputManifest the input runfiles manifest * @param artifactMiddleman the middleman artifact representing all the files the symlinks * point to (on Windows we need to know if the target of a "symlink" is @@ -56,7 +56,7 @@ public final class SymlinkTreeAction extends AbstractAction { * (must have "MANIFEST" base name). Symlink tree root * will be set to the artifact's parent directory. * @param filesetTree true if this is fileset symlink tree, - * false if this is a runfiles symlink tree. + * @param enableRunfiles true is the actual symlink tree needs to be created. */ public SymlinkTreeAction( ActionOwner owner, @@ -65,7 +65,8 @@ public final class SymlinkTreeAction extends AbstractAction { Artifact outputManifest, boolean filesetTree, PathFragment shExecutable, - ImmutableMap<String, String> shellEnvironment) { + ImmutableMap<String, String> shellEnvironment, + boolean enableRunfiles) { super(owner, computeInputs(inputManifest, artifactMiddleman), ImmutableList.of(outputManifest)); Preconditions.checkArgument(outputManifest.getPath().getBaseName().equals("MANIFEST")); this.inputManifest = inputManifest; @@ -73,6 +74,7 @@ public final class SymlinkTreeAction extends AbstractAction { this.filesetTree = filesetTree; this.shExecutable = shExecutable; this.shellEnviroment = shellEnvironment; + this.enableRunfiles = enableRunfiles; } private static ImmutableList<Artifact> computeInputs( @@ -129,6 +131,7 @@ public final class SymlinkTreeAction extends AbstractAction { actionExecutionContext .getExecutor() .getContext(SymlinkTreeActionContext.class) - .createSymlinks(this, actionExecutionContext, shExecutable, shellEnviroment); + .createSymlinks( + this, actionExecutionContext, shExecutable, shellEnviroment, enableRunfiles); } } |