diff --git a/src/main/java/com/google/devtools/build/lib/packages/Package.java b/src/main/java/com/google/devtools/build/lib/packages/Package.java index 6f37bb631141cc..2d58cf8eb62f93 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/Package.java +++ b/src/main/java/com/google/devtools/build/lib/packages/Package.java @@ -1553,15 +1553,8 @@ void addEnvironmentGroup( */ void addRuleUnchecked(Rule rule) { Preconditions.checkArgument(rule.getPackage() == pkg); - // Now, modify the package: for (OutputFile outputFile : rule.getOutputFiles()) { targets.put(outputFile.getName(), outputFile); - PathFragment outputFileFragment = PathFragment.create(outputFile.getName()); - int segmentCount = outputFileFragment.segmentCount(); - for (int i = 1; i < segmentCount; i++) { - String prefix = outputFileFragment.subFragment(0, i).toString(); - outputFilePrefixes.putIfAbsent(prefix, outputFile); - } } targets.put(rule.getName(), rule); if (rule.containsErrors()) {