Allow Singletons to export Make variables
Register any Singletons that implement a MakeVars method as MakeVarsProviders, and convert the hiddenapi singleton to use it. Test: m checkbuild Change-Id: I6a2044ad34ef46a8b267762ddfeb51aa01d7734d
This commit is contained in:
@@ -58,6 +58,9 @@ type SingletonFactory func() Singleton
|
||||
func SingletonFactoryAdaptor(factory SingletonFactory) blueprint.SingletonFactory {
|
||||
return func() blueprint.Singleton {
|
||||
singleton := factory()
|
||||
if makevars, ok := singleton.(SingletonMakeVarsProvider); ok {
|
||||
registerSingletonMakeVarsProvider(makevars)
|
||||
}
|
||||
return singletonAdaptor{singleton}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user