diff options
author | Colin Cross <ccross@android.com> | 2015-11-17 16:22:29 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2015-11-17 16:47:50 -0800 |
commit | 24ad58713895346828bd2d3d78a88d5bf7d12efb (patch) | |
tree | 8263283b19b0f93e35f5db3e5732819936093bf7 /singleton_ctx.go | |
parent | f5df83e7ee38c58a6b6bd78bb2940e4bb0e2e3e5 (diff) | |
download | android_build_blueprint-24ad58713895346828bd2d3d78a88d5bf7d12efb.tar.gz android_build_blueprint-24ad58713895346828bd2d3d78a88d5bf7d12efb.tar.bz2 android_build_blueprint-24ad58713895346828bd2d3d78a88d5bf7d12efb.zip |
Add variant methods to SingletonContext and Context
Add VisitAllModuleVariants, PrimaryModule, and FinalModule to
SingletonContext so singletons and tools can deal with modules with
multiple variants.
Diffstat (limited to 'singleton_ctx.go')
-rw-r--r-- | singleton_ctx.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/singleton_ctx.go b/singleton_ctx.go index e982086..c4c0b6c 100644 --- a/singleton_ctx.go +++ b/singleton_ctx.go @@ -49,6 +49,11 @@ type SingletonContext interface { VisitDepsDepthFirstIf(module Module, pred func(Module) bool, visit func(Module)) + VisitAllModuleVariants(module Module, visit func(Module)) + + PrimaryModule(module Module) Module + FinalModule(module Module) Module + AddNinjaFileDeps(deps ...string) } @@ -166,6 +171,18 @@ func (s *singletonContext) VisitDepsDepthFirstIf(module Module, s.context.VisitDepsDepthFirstIf(module, pred, visit) } +func (s *singletonContext) PrimaryModule(module Module) Module { + return s.context.PrimaryModule(module) +} + +func (s *singletonContext) FinalModule(module Module) Module { + return s.context.FinalModule(module) +} + +func (s *singletonContext) VisitAllModuleVariants(module Module, visit func(Module)) { + s.context.VisitAllModuleVariants(module, visit) +} + func (s *singletonContext) AddNinjaFileDeps(deps ...string) { s.ninjaFileDeps = append(s.ninjaFileDeps, deps...) } |