aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2015-03-02 15:51:58 +0000
committerGravatar Ulf Adams <ulfjack@google.com>2015-03-05 14:16:41 +0000
commitb579b9488fb71faa39f17bcc76d87c4396e90735 (patch)
tree3e3efe4dfcab3bf30c04f82a354b313272090c7b /src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
parentc9bacf1bf8450be5ebe1e94f50706089dbf33225 (diff)
Get runfiles prefix from the WORKSPACE file
-- MOS_MIGRATED_REVID=87513766
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
index f0cf213928..dddc006a4d 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
@@ -31,7 +31,6 @@ import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.SubscriberExceptionContext;
import com.google.common.eventbus.SubscriberExceptionHandler;
import com.google.common.util.concurrent.Uninterruptibles;
-import com.google.devtools.build.lib.Constants;
import com.google.devtools.build.lib.actions.PackageRootResolver;
import com.google.devtools.build.lib.actions.cache.ActionCache;
import com.google.devtools.build.lib.actions.cache.CompactPersistentActionCache;
@@ -181,9 +180,6 @@ public final class BlazeRuntime {
private Path workingDirectory;
private long commandStartTime;
- // Application-specified constants
- private final PathFragment runfilesPrefix;
-
private final SkyframeExecutor skyframeExecutor;
private final Reporter reporter;
@@ -247,7 +243,7 @@ public final class BlazeRuntime {
WorkspaceStatusAction.Factory workspaceStatusActionFactory,
final SkyframeExecutor skyframeExecutor,
PackageFactory pkgFactory, ConfiguredRuleClassProvider ruleClassProvider,
- ConfigurationFactory configurationFactory, PathFragment runfilesPrefix, Clock clock,
+ ConfigurationFactory configurationFactory, Clock clock,
OptionsProvider startupOptionsProvider, Iterable<BlazeModule> blazeModules,
Map<String, String> clientEnv,
TimestampGranularityMonitor timestampGranularityMonitor,
@@ -257,7 +253,6 @@ public final class BlazeRuntime {
this.directories = directories;
this.workingDirectory = directories.getWorkspace();
this.reporter = reporter;
- this.runfilesPrefix = runfilesPrefix;
this.packageFactory = pkgFactory;
this.binTools = binTools;
this.projectFileProvider = projectFileProvider;
@@ -342,7 +337,7 @@ public final class BlazeRuntime {
/**
* Conditionally enable profiling.
*/
- private final boolean initProfiler(CommonCommandOptions options,
+ private final boolean initProfiler(CommonCommandOptions options,
UUID buildID, long execStartTimeNanos) {
OutputStream out = null;
boolean recordFullProfilerData = false;
@@ -439,13 +434,6 @@ public final class BlazeRuntime {
}
/**
- * Returns any prefix to be inserted between relative source paths and the runfiles directory.
- */
- public PathFragment getRunfilesPrefix() {
- return runfilesPrefix;
- }
-
- /**
* Returns the Blaze directories object for this runtime.
*/
public BlazeDirectories getDirectories() {
@@ -1489,7 +1477,6 @@ public final class BlazeRuntime {
? new BlazeRuntime.BugReportingExceptionHandler()
: new BlazeRuntime.RemoteExceptionHandler());
- runtimeBuilder.setRunfilesPrefix(new PathFragment(Constants.RUNFILES_PREFIX));
for (BlazeModule blazeModule : blazeModules) {
runtimeBuilder.addBlazeModule(blazeModule);
}
@@ -1576,7 +1563,6 @@ public final class BlazeRuntime {
*/
public static class Builder {
- private PathFragment runfilesPrefix = PathFragment.EMPTY_FRAGMENT;
private BlazeDirectories directories;
private Reporter reporter;
private ConfigurationFactory configurationFactory;
@@ -1733,17 +1719,11 @@ public final class BlazeRuntime {
return new BlazeRuntime(directories, reporter, workspaceStatusActionFactory, skyframeExecutor,
pkgFactory, ruleClassProvider, configurationFactory,
- runfilesPrefix == null ? PathFragment.EMPTY_FRAGMENT : runfilesPrefix,
clock, startupOptionsProvider, ImmutableList.copyOf(blazeModules),
clientEnv, timestampMonitor,
eventBusExceptionHandler, binTools, projectFileProvider);
}
- public Builder setRunfilesPrefix(PathFragment prefix) {
- this.runfilesPrefix = prefix;
- return this;
- }
-
public Builder setBinTools(BinTools binTools) {
this.binTools = binTools;
return this;