diff options
author | 2016-11-12 17:46:09 +0000 | |
---|---|---|
committer | 2016-11-14 14:59:39 +0000 | |
commit | eb6917daef1c6d019af822527e7f750c8419caac (patch) | |
tree | 4579f8521b560d5175445eb4a63f2f7208191452 | |
parent | 383b1e4bc0cd2a533508d500483f29a40a12fe1a (diff) |
Description redacted.
--
MOS_MIGRATED_REVID=138969633
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java index 136423222d..e1352d5b1c 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java @@ -605,20 +605,15 @@ public final class CcLibraryHelper { */ public CcLibraryHelper addDeps(Iterable<? extends TransitiveInfoCollection> deps) { for (TransitiveInfoCollection dep : deps) { - addDep(dep); + Preconditions.checkArgument(dep.getConfiguration() == null + || configuration.equalsOrIsSupersetOf(dep.getConfiguration()), + "dep " + dep.getLabel() + " has a different config than " + ruleContext.getLabel()); + this.implementationDeps.add(dep); + this.interfaceDeps.add(dep); } return this; } - public CcLibraryHelper addDep(TransitiveInfoCollection dep) { - Preconditions.checkArgument(dep.getConfiguration() == null - || configuration.equalsOrIsSupersetOf(dep.getConfiguration()), - "dep " + dep.getLabel() + " has a different config than " + ruleContext.getLabel()); - this.implementationDeps.add(dep); - this.interfaceDeps.add(dep); - return this; - } - public CcLibraryHelper addDepContext(CppCompilationContext dep) { this.depContexts.add(Preconditions.checkNotNull(dep)); return this; |