aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/BuildConfigurationFunction.java
diff options
context:
space:
mode:
authorGravatar kchodorow <kchodorow@google.com>2017-03-30 16:45:03 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2017-03-31 17:09:07 +0200
commit1d9e1ac90197b1d3d7b137ba3c1ada67bb9ba31b (patch)
treee1fd678b5e641169c50762929b7641a17b4e147f /src/main/java/com/google/devtools/build/lib/skyframe/BuildConfigurationFunction.java
parentea6f209f88e4292f0af5b75ef6872e1902eaeccd (diff)
Symlink output directories to the correct directory name
If the workspace directory is /path/to/my/proj and the name in the WORKSPACE file is "floop", this will symlink the output directories to output_base/execroot/floop instead of output_base/execroot/proj. More prep for #1262, fixes #1681. PiperOrigin-RevId: 151712384
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/BuildConfigurationFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/BuildConfigurationFunction.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/BuildConfigurationFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/BuildConfigurationFunction.java
index 3f18f8502b..71c5f0ac2c 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/BuildConfigurationFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/BuildConfigurationFunction.java
@@ -53,6 +53,12 @@ public class BuildConfigurationFunction implements SkyFunction {
@Override
public SkyValue compute(SkyKey skyKey, Environment env)
throws InterruptedException, BuildConfigurationFunctionException {
+ WorkspaceNameValue workspaceNameValue = (WorkspaceNameValue) env
+ .getValue(WorkspaceNameValue.key());
+ if (workspaceNameValue == null) {
+ return null;
+ }
+
BuildConfigurationValue.Key key = (BuildConfigurationValue.Key) skyKey.argument();
Set<Fragment> fragments;
try {
@@ -70,7 +76,7 @@ public class BuildConfigurationFunction implements SkyFunction {
}
BuildConfiguration config = new BuildConfiguration(directories, fragmentsMap,
- key.getBuildOptions(), !key.actionsEnabled());
+ key.getBuildOptions(), !key.actionsEnabled(), workspaceNameValue.getName());
// Unlike static configurations, dynamic configurations don't need to embed transition logic
// within the configuration itself. However we still use this interface to provide a mapping
// between Transition types (e.g. HOST) and the dynamic transitions that apply those