Stop allowing targets with loose headers checking that reference srcs/hdrs in other package to also treat those package as loose.
@@ -591,18 +591,6 @@ public final class CcCommon {
.getPathUnderExecRoot();
result.add(rulePackage);
- // Gather up all the dirs from the rule's srcs as well as any of the srcs outputs.
- if (hasAttribute("srcs", BuildType.LABEL_LIST)) {
- for (TransitiveInfoCollection src :
- ruleContext.getPrerequisitesIf("srcs", Mode.TARGET, FileProvider.class)) {
- result.add(src.getLabel().getPackageIdentifier().getPathUnderExecRoot());
- for (Artifact a : src.getProvider(FileProvider.class).getFilesToBuild()) {
- // Attempt to gather subdirectories that might contain include files.
- result.add(a.getRootRelativePath().getParentDirectory());
- }
- }
- }
-
// Add in any 'includes' attribute values as relative path fragments
if (ruleContext.getRule().isAttributeValueExplicitlySpecified("includes")) {
PathFragment packageFragment = ruleContext.getLabel().getPackageIdentifier()
