aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions/MiddlemanFactory.java
diff options
context:
space:
mode:
authorGravatar Lukacs Berki <lberki@google.com>2016-01-26 14:47:15 +0000
committerGravatar Lukacs Berki <lberki@google.com>2016-01-26 14:50:23 +0000
commit41f4456ac2348bef66739194853a1ddadcbb887e (patch)
tree06946ed64729aae994719a85286b6392edf811fc /src/main/java/com/google/devtools/build/lib/actions/MiddlemanFactory.java
parent213ae7a17f047ecf46fec190beb23f10f58268aa (diff)
Make runfiles tree creation on Windows depend on the artifacts of the actual runfiles.
This is necessary because the plan for Windows calls for knowing if the target of the symlink is a directory or a file, thus, we cannot create runfiles trees before the artifacts in them are built. This probably comes with a performance hit due to the extra scheduling constraints. This makes almost every test pass save: - test_tmpdir in bazel_test_test, which I hereby dismiss as a fluke - test_http_archive_tgz in external_integration_test (Maybe a permissions issue due to copying things?) - A bunch of test in external_correctness_test, probably related to the fact that since we are copying things, we don't notice changes to the original files. -- MOS_MIGRATED_REVID=113050025
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/MiddlemanFactory.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/MiddlemanFactory.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/MiddlemanFactory.java b/src/main/java/com/google/devtools/build/lib/actions/MiddlemanFactory.java
index aecfd359bc..24c436c190 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/MiddlemanFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/MiddlemanFactory.java
@@ -23,6 +23,8 @@ import com.google.devtools.build.lib.vfs.PathFragment;
import java.util.Iterator;
+import javax.annotation.Nullable;
+
/**
* A factory to create middleman objects.
*/
@@ -82,8 +84,8 @@ public final class MiddlemanFactory {
* @param middlemanDir the directory in which to place the middleman.
*/
public Artifact createRunfilesMiddleman(
- ActionOwner owner, Artifact owningArtifact, Iterable<Artifact> inputs, Root middlemanDir,
- String tag) {
+ ActionOwner owner, @Nullable Artifact owningArtifact, Iterable<Artifact> inputs,
+ Root middlemanDir, String tag) {
if (hasExactlyOneInput(inputs)) { // Optimization: No middleman for just one input.
return Iterables.getOnlyElement(inputs);
}