Allow cross-cutting dependencies like licenses.
Test: m all Bug: 171227245 Bug: 151953481 Bug: 151177513 Bug: 67772237 Change-Id: I6e8ce01898e174a9587469157485debbb7b96980
This commit is contained in:
parent
7701309889
commit
07065cd360
|
@ -2374,6 +2374,16 @@ func (b *baseModuleContext) FinalModule() Module {
|
||||||
return b.bp.FinalModule().(Module)
|
return b.bp.FinalModule().(Module)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsMetaDependencyTag returns true for cross-cutting metadata dependencies.
|
||||||
|
func IsMetaDependencyTag(tag blueprint.DependencyTag) bool {
|
||||||
|
if tag == licenseKindTag {
|
||||||
|
return true
|
||||||
|
} else if tag == licensesTag {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
// A regexp for removing boilerplate from BaseDependencyTag from the string representation of
|
// A regexp for removing boilerplate from BaseDependencyTag from the string representation of
|
||||||
// a dependency tag.
|
// a dependency tag.
|
||||||
var tagCleaner = regexp.MustCompile(`\QBaseDependencyTag:{}\E(, )?`)
|
var tagCleaner = regexp.MustCompile(`\QBaseDependencyTag:{}\E(, )?`)
|
||||||
|
|
|
@ -90,6 +90,10 @@ func (b *BootImageModule) DepIsInSameApex(ctx android.BaseModuleContext, dep and
|
||||||
// The dex2oat tool is only needed for building and is not required in the apex.
|
// The dex2oat tool is only needed for building and is not required in the apex.
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if android.IsMetaDependencyTag(tag) {
|
||||||
|
// Cross-cutting metadata dependencies are metadata.
|
||||||
|
return false
|
||||||
|
}
|
||||||
panic(fmt.Errorf("boot_image module %q should not have a dependency on %q via tag %s", b, dep, android.PrettyPrintTag(tag)))
|
panic(fmt.Errorf("boot_image module %q should not have a dependency on %q via tag %s", b, dep, android.PrettyPrintTag(tag)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue