use of com.google.devtools.build.lib.actions.ExecutorInitException in project bazel by bazelbuild.
the class ExecutionTool method startLocalOutputBuild.
/**
* Prepare for a local output build.
*/
private void startLocalOutputBuild(String workspaceName) throws ExecutorInitException {
try (AutoProfiler p = AutoProfiler.profiled("Starting local output build", ProfilerTask.INFO)) {
Path outputPath = env.getDirectories().getOutputPath(workspaceName);
Path localOutputPath = env.getDirectories().getLocalOutputPath();
if (outputPath.isSymbolicLink()) {
try {
// Remove the existing symlink first.
outputPath.delete();
if (localOutputPath.exists()) {
// Pre-existing local output directory. Move to outputPath.
localOutputPath.renameTo(outputPath);
}
} catch (IOException e) {
throw new ExecutorInitException("Couldn't handle local output directory symlinks", e);
}
}
}
}
use of com.google.devtools.build.lib.actions.ExecutorInitException in project bazel by bazelbuild.
the class ExecutionTool method prepare.
private void prepare(ImmutableMap<PackageIdentifier, Path> packageRoots, String workspaceName) throws ExecutorInitException {
// Prepare for build.
Profiler.instance().markPhase(ProfilePhase.PREPARE);
// Create some tools symlinks / cleanup per-build state
createActionLogDirectory();
// Plant the symlink forest.
try {
new SymlinkForest(packageRoots, getExecRoot(), runtime.getProductName(), workspaceName).plantSymlinkForest();
} catch (IOException e) {
throw new ExecutorInitException("Source forest creation failed", e);
}
}
Aggregations