Add VisitDirectDepsWithTag
Add a method on ModuleContext and TopDownMutatorContext to visit direct dependencies that have a given dependency tag. Test: m checkbuild Change-Id: Ib875563091dcae6b7282b3e3427d0eb07d8c8af5
This commit is contained in:
@@ -59,11 +59,7 @@ func (cov *coverage) flags(ctx ModuleContext, flags Flags) Flags {
|
||||
// For static libraries, the only thing that changes our object files
|
||||
// are included whole static libraries, so check to see if any of
|
||||
// those have coverage enabled.
|
||||
ctx.VisitDirectDeps(func(m android.Module) {
|
||||
if ctx.OtherModuleDependencyTag(m) != wholeStaticDepTag {
|
||||
return
|
||||
}
|
||||
|
||||
ctx.VisitDirectDepsWithTag(wholeStaticDepTag, func(m android.Module) {
|
||||
if cc, ok := m.(*Module); ok && cc.coverage != nil {
|
||||
if cc.coverage.linkCoverage {
|
||||
cov.linkCoverage = true
|
||||
|
Reference in New Issue
Block a user