The include scanner also returns the primary source file in its output,
so we don't need to go looking for that in the declared include directories.
RELNOTES: None.
@@ -390,6 +390,9 @@ public class CppCompileAction extends AbstractAction
// anyway. Not having to look at them here saves us from requiring and ArtifactExpander, which
// actionExecutionContext doesn't have at this point. This only works as long as mandatory
// inputs do not contain headers that are built into a module.
+ for (Artifact source : getIncludeScannerSources()) {
+ undeclaredHeaders.remove(source);
+ }
for (Artifact header : ccCompilationContext.getDeclaredIncludeSrcs()) {
undeclaredHeaders.remove(header);
}
