Dedup prebuilt apis module type/mutator registration

Test: m checkbuild
Bug: 146540677
Change-Id: If5d6fdace2574df6314fbcf6441838cd11df58ae
This commit is contained in:
Paul Duffin
2019-12-19 11:25:19 +00:00
parent 43dc1cc2bc
commit a48f758d84
3 changed files with 14 additions and 6 deletions

View File

@@ -122,6 +122,7 @@ func ModuleTypeFactories() map[string]ModuleFactory {
type RegistrationContext interface {
RegisterModuleType(name string, factory ModuleFactory)
RegisterSingletonType(name string, factory SingletonFactory)
PreArchMutators(f RegisterMutatorFunc)
}
// Used to register build components from an init() method, e.g.
@@ -154,3 +155,7 @@ func (ctx initRegistrationContext) RegisterModuleType(name string, factory Modul
func (ctx initRegistrationContext) RegisterSingletonType(name string, factory SingletonFactory) {
RegisterSingletonType(name, factory)
}
func (ctx initRegistrationContext) PreArchMutators(f RegisterMutatorFunc) {
PreArchMutators(f)
}