From b59d65443a9df242b1c6ba9ef0912ff02941a123 Mon Sep 17 00:00:00 2001 From: shahan Date: Thu, 9 Aug 2018 08:18:39 -0700 Subject: Stop allowing targets with loose headers checking that reference srcs/hdrs in other package to also treat those package as loose. PiperOrigin-RevId: 208051086 --- .../com/google/devtools/build/lib/rules/cpp/CcCommon.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java index 321d3755ec..ffcd3fece7 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java @@ -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() -- cgit v1.2.3