use of com.google.devtools.build.lib.rules.cpp.CppCompileActionContext.Reply in project bazel by bazelbuild.
the class CppCompileAction method execute.
@Override
@ThreadCompatible
public void execute(ActionExecutionContext actionExecutionContext) throws ActionExecutionException, InterruptedException {
setModuleFileFlags();
Executor executor = actionExecutionContext.getExecutor();
CppCompileActionContext.Reply reply;
try {
reply = executor.getContext(actionContext).execWithReply(this, actionExecutionContext);
} catch (ExecException e) {
throw e.toActionExecutionException("C++ compilation of rule '" + getOwner().getLabel() + "'", executor.getVerboseFailures(), this);
}
ensureCoverageNotesFilesExist();
// This is the .d file scanning part.
IncludeScanningContext scanningContext = executor.getContext(IncludeScanningContext.class);
Path execRoot = executor.getExecRoot();
NestedSet<Artifact> discoveredInputs = discoverInputsFromDotdFiles(execRoot, scanningContext.getArtifactResolver(), reply);
// Clear in-memory .d files early.
reply = null;
// Post-execute "include scanning", which modifies the action inputs to match what the compile
// action actually used by incorporating the results of .d file parsing.
updateActionInputs(discoveredInputs);
// HeadersCheckingMode.NONE should only be used for ObjC build actions.
if (cppSemantics.needsIncludeValidation()) {
validateInclusions(discoveredInputs, actionExecutionContext.getArtifactExpander(), executor.getEventHandler());
}
}
Aggregations