diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java b/src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java index 07282a2bd0..513bc869d6 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java @@ -97,7 +97,8 @@ public class RunfilesSupport { && TargetUtils.isTestRule(ruleContext.getRule())) { TransitiveInfoCollection runUnderTarget = ruleContext.getPrerequisite(":run_under", Mode.DATA); - runfiles = new Runfiles.Builder(ruleContext.getWorkspaceName()) + runfiles = new Runfiles.Builder( + ruleContext.getWorkspaceName(), ruleContext.getConfiguration().legacyExternalRunfiles()) .merge(getRunfiles(runUnderTarget)) .merge(runfiles) .build(); @@ -233,6 +234,13 @@ public class RunfilesSupport { } /** + * Returns the name of the workspace that the build is occurring in. + */ + public PathFragment getWorkspaceName() { + return runfiles.getSuffix(); + } + + /** * Returns the middleman artifact that depends on getExecutable(), * getRunfilesManifest(), and getRunfilesSymlinkTargets(). Anything which * needs to actually run the executable should depend on this. |