Loading android/apex.go +1 −1 Original line number Diff line number Diff line Loading @@ -833,7 +833,7 @@ func UpdateDirectlyInAnyApex(mctx BottomUpMutatorContext, am ApexModule) { // If this is the FinalModule (last visited module) copy // AnyVariantDirectlyInAnyApex to all the other variants if am == mctx.FinalModule().(ApexModule) { if mctx.IsFinalModule(am) { mctx.VisitAllModuleVariants(func(variant Module) { variant.(ApexModule).apexModuleBase().ApexProperties.AnyVariantDirectlyInAnyApex = base.ApexProperties.AnyVariantDirectlyInAnyApex Loading android/base_module_context.go +11 −1 Original line number Diff line number Diff line Loading @@ -198,9 +198,15 @@ type BaseModuleContext interface { // singleton actions that are only done once for all variants of a module. FinalModule() Module // IsFinalModule returns if the current module is the last variant. Variants of a module are always visited in // order by mutators and GenerateBuildActions, so the data created by the current mutator can be read from all // variants using VisitAllModuleVariants if the current module is the last one. This can be used to perform // singleton actions that are only done once for all variants of a module. IsFinalModule(module Module) bool // VisitAllModuleVariants calls visit for each variant of the current module. Variants of a module are always // visited in order by mutators and GenerateBuildActions, so the data created by the current mutator can be read // from all variants if the current module == FinalModule(). Otherwise, care must be taken to not access any // from all variants if the current module is the last one. Otherwise, care must be taken to not access any // data modified by the current mutator. VisitAllModuleVariants(visit func(Module)) Loading Loading @@ -592,6 +598,10 @@ func (b *baseModuleContext) FinalModule() Module { return b.bp.FinalModule().(Module) } func (b *baseModuleContext) IsFinalModule(module Module) bool { return b.bp.IsFinalModule(module) } // IsMetaDependencyTag returns true for cross-cutting metadata dependencies. func IsMetaDependencyTag(tag blueprint.DependencyTag) bool { if tag == licenseKindTag { Loading android/module.go +1 −1 Original line number Diff line number Diff line Loading @@ -2036,7 +2036,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) ctx.GetMissingDependencies() } if m == ctx.FinalModule().(Module).base() { if ctx.IsFinalModule(m.module) { m.generateModuleTarget(ctx) if ctx.Failed() { return Loading android/singleton.go +3 −3 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ type SingletonContext interface { VisitAllModuleVariantProxies(module Module, visit func(proxy ModuleProxy)) PrimaryModule(module Module) Module FinalModule(module Module) Module IsFinalModule(module Module) bool AddNinjaFileDeps(deps ...string) Loading Loading @@ -273,8 +273,8 @@ func (s *singletonContextAdaptor) PrimaryModule(module Module) Module { return s.SingletonContext.PrimaryModule(module).(Module) } func (s *singletonContextAdaptor) FinalModule(module Module) Module { return s.SingletonContext.FinalModule(module).(Module) func (s *singletonContextAdaptor) IsFinalModule(module Module) bool { return s.SingletonContext.IsFinalModule(module) } func (s *singletonContextAdaptor) ModuleVariantsFromName(referer Module, name string) []Module { Loading cc/tidy.go +1 −1 Original line number Diff line number Diff line Loading @@ -254,7 +254,7 @@ func (m *tidyPhonySingleton) GenerateBuildActions(ctx android.SingletonContext) // Collect tidy/obj targets from the 'final' modules. ctx.VisitAllModules(func(module android.Module) { if module == ctx.FinalModule(module) { if ctx.IsFinalModule(module) { collectTidyObjModuleTargets(ctx, module, tidyModulesInDirGroup, objModulesInDirGroup) } }) Loading Loading
android/apex.go +1 −1 Original line number Diff line number Diff line Loading @@ -833,7 +833,7 @@ func UpdateDirectlyInAnyApex(mctx BottomUpMutatorContext, am ApexModule) { // If this is the FinalModule (last visited module) copy // AnyVariantDirectlyInAnyApex to all the other variants if am == mctx.FinalModule().(ApexModule) { if mctx.IsFinalModule(am) { mctx.VisitAllModuleVariants(func(variant Module) { variant.(ApexModule).apexModuleBase().ApexProperties.AnyVariantDirectlyInAnyApex = base.ApexProperties.AnyVariantDirectlyInAnyApex Loading
android/base_module_context.go +11 −1 Original line number Diff line number Diff line Loading @@ -198,9 +198,15 @@ type BaseModuleContext interface { // singleton actions that are only done once for all variants of a module. FinalModule() Module // IsFinalModule returns if the current module is the last variant. Variants of a module are always visited in // order by mutators and GenerateBuildActions, so the data created by the current mutator can be read from all // variants using VisitAllModuleVariants if the current module is the last one. This can be used to perform // singleton actions that are only done once for all variants of a module. IsFinalModule(module Module) bool // VisitAllModuleVariants calls visit for each variant of the current module. Variants of a module are always // visited in order by mutators and GenerateBuildActions, so the data created by the current mutator can be read // from all variants if the current module == FinalModule(). Otherwise, care must be taken to not access any // from all variants if the current module is the last one. Otherwise, care must be taken to not access any // data modified by the current mutator. VisitAllModuleVariants(visit func(Module)) Loading Loading @@ -592,6 +598,10 @@ func (b *baseModuleContext) FinalModule() Module { return b.bp.FinalModule().(Module) } func (b *baseModuleContext) IsFinalModule(module Module) bool { return b.bp.IsFinalModule(module) } // IsMetaDependencyTag returns true for cross-cutting metadata dependencies. func IsMetaDependencyTag(tag blueprint.DependencyTag) bool { if tag == licenseKindTag { Loading
android/module.go +1 −1 Original line number Diff line number Diff line Loading @@ -2036,7 +2036,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) ctx.GetMissingDependencies() } if m == ctx.FinalModule().(Module).base() { if ctx.IsFinalModule(m.module) { m.generateModuleTarget(ctx) if ctx.Failed() { return Loading
android/singleton.go +3 −3 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ type SingletonContext interface { VisitAllModuleVariantProxies(module Module, visit func(proxy ModuleProxy)) PrimaryModule(module Module) Module FinalModule(module Module) Module IsFinalModule(module Module) bool AddNinjaFileDeps(deps ...string) Loading Loading @@ -273,8 +273,8 @@ func (s *singletonContextAdaptor) PrimaryModule(module Module) Module { return s.SingletonContext.PrimaryModule(module).(Module) } func (s *singletonContextAdaptor) FinalModule(module Module) Module { return s.SingletonContext.FinalModule(module).(Module) func (s *singletonContextAdaptor) IsFinalModule(module Module) bool { return s.SingletonContext.IsFinalModule(module) } func (s *singletonContextAdaptor) ModuleVariantsFromName(referer Module, name string) []Module { Loading
cc/tidy.go +1 −1 Original line number Diff line number Diff line Loading @@ -254,7 +254,7 @@ func (m *tidyPhonySingleton) GenerateBuildActions(ctx android.SingletonContext) // Collect tidy/obj targets from the 'final' modules. ctx.VisitAllModules(func(module android.Module) { if module == ctx.FinalModule(module) { if ctx.IsFinalModule(module) { collectTidyObjModuleTargets(ctx, module, tidyModulesInDirGroup, objModulesInDirGroup) } }) Loading