Merge "Do not add dependencies from disabled sdk variants to its members" am: 1c1c6ab46b

Change-Id: I352ae417ed60378f205f9c2358e63699f512a27b
This commit is contained in:
Automerger Merge Worker 2020-02-21 08:34:25 +00:00
commit 63f0e96c10

View file

@ -320,10 +320,12 @@ func (t sdkMemberVersionedDepTag) ExcludeFromVisibilityEnforcement() {}
// Step 1: create dependencies from an SDK module to its members.
func memberMutator(mctx android.BottomUpMutatorContext) {
if s, ok := mctx.Module().(*sdk); ok {
for _, memberListProperty := range s.memberListProperties() {
names := memberListProperty.getter(s.dynamicMemberTypeListProperties)
tag := memberListProperty.dependencyTag
memberListProperty.memberType.AddDependencies(mctx, tag, names)
if s.Enabled() {
for _, memberListProperty := range s.memberListProperties() {
names := memberListProperty.getter(s.dynamicMemberTypeListProperties)
tag := memberListProperty.dependencyTag
memberListProperty.memberType.AddDependencies(mctx, tag, names)
}
}
}
}