Search in sources :

Example 1 with DependencySet

use of com.google.devtools.build.lib.util.DependencySet in project bazel by bazelbuild.

the class CppCompileAction method processDepset.

public DependencySet processDepset(Path execRoot, Reply reply) throws ActionExecutionException {
    try {
        DotdFile dotdFile = getDotdFile();
        Preconditions.checkNotNull(dotdFile);
        DependencySet depSet = new DependencySet(execRoot);
        // Perhaps we produced the file locally.
        if (dotdFile.artifact() != null || reply == null) {
            return depSet.read(dotdFile.getPath());
        } else {
            // This is an in-memory .d file.
            return depSet.process(reply.getContents());
        }
    } catch (IOException e) {
        // Some kind of IO or parse exception--wrap & rethrow it to stop the build.
        throw new ActionExecutionException("error while parsing .d file", e, this, false);
    }
}
Also used : DependencySet(com.google.devtools.build.lib.util.DependencySet) IOException(java.io.IOException) ActionExecutionException(com.google.devtools.build.lib.actions.ActionExecutionException)

Aggregations

ActionExecutionException (com.google.devtools.build.lib.actions.ActionExecutionException)1 DependencySet (com.google.devtools.build.lib.util.DependencySet)1 IOException (java.io.IOException)1