Simplify BinTools: There is no need to create a "_bin" directory under the execRoot. If running the binary locally, we can execute from the install_base directly.
RELNOTES: None
PiperOrigin-RevId: 219193314
diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java b/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
index a443070..e48494f 100644
--- a/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
+++ b/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
@@ -28,7 +28,6 @@
import com.google.devtools.build.lib.actions.ActionInputPrefetcher;
import com.google.devtools.build.lib.actions.ArtifactFactory;
import com.google.devtools.build.lib.actions.BuildFailedException;
-import com.google.devtools.build.lib.actions.ExecException;
import com.google.devtools.build.lib.actions.Executor;
import com.google.devtools.build.lib.actions.ExecutorInitException;
import com.google.devtools.build.lib.actions.LocalHostCapacity;
@@ -125,10 +124,10 @@
this.runtime = env.getRuntime();
this.request = request;
- // Create tools before getting the strategies from the modules as some of them need tools to
- // determine whether the host actually supports certain strategies (e.g. sandboxing).
- try (SilentCloseable closeable = Profiler.instance().profile("createToolsSymlinks")) {
- createToolsSymlinks();
+ try {
+ env.getExecRoot().createDirectoryAndParents();
+ } catch (IOException e) {
+ throw new ExecutorInitException("Execroot creation failed", e);
}
ExecutorBuilder builder = new ExecutorBuilder();
@@ -436,14 +435,6 @@
}
}
- private void createToolsSymlinks() throws ExecutorInitException {
- try {
- env.getBlazeWorkspace().getBinTools().setupBuildTools(env.getWorkspaceName());
- } catch (ExecException e) {
- throw new ExecutorInitException("Tools symlink creation failed", e);
- }
- }
-
private void createActionLogDirectory() throws ExecutorInitException {
Path directory = env.getActionConsoleOutputDirectory();
try {