Merge "Add OtherModuleFarDependencyVariantExists." am: 1f716db99f
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1697063 Change-Id: I0ee202a7a8003d0226c263cb999d973121e55dc9
This commit is contained in:
commit
4c3f2a4a4b
1 changed files with 18 additions and 2 deletions
|
@ -297,13 +297,20 @@ type BaseModuleContext interface {
|
||||||
// OtherModuleDependencyVariantExists returns true if a module with the
|
// OtherModuleDependencyVariantExists returns true if a module with the
|
||||||
// specified name and variant exists. The variant must match the given
|
// specified name and variant exists. The variant must match the given
|
||||||
// variations. It must also match all the non-local variations of the current
|
// variations. It must also match all the non-local variations of the current
|
||||||
// module. In other words, it checks for the module AddVariationDependencies
|
// module. In other words, it checks for the module that AddVariationDependencies
|
||||||
// would add a dependency on with the same arguments.
|
// would add a dependency on with the same arguments.
|
||||||
OtherModuleDependencyVariantExists(variations []Variation, name string) bool
|
OtherModuleDependencyVariantExists(variations []Variation, name string) bool
|
||||||
|
|
||||||
|
// OtherModuleFarDependencyVariantExists returns true if a module with the
|
||||||
|
// specified name and variant exists. The variant must match the given
|
||||||
|
// variations, but not the non-local variations of the current module. In
|
||||||
|
// other words, it checks for the module that AddFarVariationDependencies
|
||||||
|
// would add a dependency on with the same arguments.
|
||||||
|
OtherModuleFarDependencyVariantExists(variations []Variation, name string) bool
|
||||||
|
|
||||||
// OtherModuleReverseDependencyVariantExists returns true if a module with the
|
// OtherModuleReverseDependencyVariantExists returns true if a module with the
|
||||||
// specified name exists with the same variations as the current module. In
|
// specified name exists with the same variations as the current module. In
|
||||||
// other words, it checks for the module AddReverseDependency would add a
|
// other words, it checks for the module that AddReverseDependency would add a
|
||||||
// dependency on with the same argument.
|
// dependency on with the same argument.
|
||||||
OtherModuleReverseDependencyVariantExists(name string) bool
|
OtherModuleReverseDependencyVariantExists(name string) bool
|
||||||
|
|
||||||
|
@ -539,6 +546,15 @@ func (m *baseModuleContext) OtherModuleDependencyVariantExists(variations []Vari
|
||||||
return found != nil
|
return found != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *baseModuleContext) OtherModuleFarDependencyVariantExists(variations []Variation, name string) bool {
|
||||||
|
possibleDeps := m.context.moduleGroupFromName(name, m.module.namespace())
|
||||||
|
if possibleDeps == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
found, _ := findVariant(m.module, possibleDeps, variations, true, false)
|
||||||
|
return found != nil
|
||||||
|
}
|
||||||
|
|
||||||
func (m *baseModuleContext) OtherModuleReverseDependencyVariantExists(name string) bool {
|
func (m *baseModuleContext) OtherModuleReverseDependencyVariantExists(name string) bool {
|
||||||
possibleDeps := m.context.moduleGroupFromName(name, m.module.namespace())
|
possibleDeps := m.context.moduleGroupFromName(name, m.module.namespace())
|
||||||
if possibleDeps == nil {
|
if possibleDeps == nil {
|
||||||
|
|
Loading…
Reference in a new issue