Search in sources :

Example 1 with IncludeScanningContext

use of com.google.devtools.build.lib.rules.cpp.IncludeScanningContext in project bazel by bazelbuild.

the class ObjcCompileAction method execute.

@Override
public void execute(ActionExecutionContext actionExecutionContext) throws ActionExecutionException, InterruptedException {
    super.execute(actionExecutionContext);
    if (dotdPruningPlan == HeaderDiscovery.DotdPruningMode.USE) {
        Executor executor = actionExecutionContext.getExecutor();
        IncludeScanningContext scanningContext = executor.getContext(IncludeScanningContext.class);
        NestedSet<Artifact> discoveredInputs = discoverInputsFromDotdFiles(executor.getExecRoot(), scanningContext.getArtifactResolver());
        updateActionInputs(discoveredInputs);
    } else {
        // TODO(lberki): This is awkward, but necessary since updateInputs() must be called when
        // input discovery is in effect. I *think* it's possible to avoid setting discoversInputs()
        // to true if the header list file is null and then we'd not need to have this here, but I
        // haven't quite managed to get that right yet.
        updateActionInputs(getInputs());
    }
}
Also used : Executor(com.google.devtools.build.lib.actions.Executor) IncludeScanningContext(com.google.devtools.build.lib.rules.cpp.IncludeScanningContext) Artifact(com.google.devtools.build.lib.actions.Artifact)

Aggregations

Artifact (com.google.devtools.build.lib.actions.Artifact)1 Executor (com.google.devtools.build.lib.actions.Executor)1 IncludeScanningContext (com.google.devtools.build.lib.rules.cpp.IncludeScanningContext)1