Merge "Run makevars singleton after all other registered singletons"

am: a838004f8c

Change-Id: I9aec2658898401b7fc4988850a2481b5e5d915f0
This commit is contained in:
Colin Cross 2019-02-12 16:38:16 -08:00 committed by android-build-merger
commit f54b401be4
2 changed files with 4 additions and 4 deletions

View file

@ -92,10 +92,6 @@ func RegisterMakeVarsProvider(pctx PackageContext, provider MakeVarsProvider) {
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
func init() {
RegisterSingletonType("makevars", makeVarsSingletonFunc)
}
func makeVarsSingletonFunc() Singleton { func makeVarsSingletonFunc() Singleton {
return &makeVarsSingleton{} return &makeVarsSingleton{}
} }

View file

@ -99,5 +99,9 @@ func (ctx *Context) Register() {
registerMutators(ctx.Context, preArch, preDeps, postDeps) registerMutators(ctx.Context, preArch, preDeps, postDeps)
// Register makevars after other singletons so they can export values through makevars
ctx.RegisterSingletonType("makevars", SingletonFactoryAdaptor(makeVarsSingletonFunc))
// Register env last so that it can track all used environment variables
ctx.RegisterSingletonType("env", SingletonFactoryAdaptor(EnvSingleton)) ctx.RegisterSingletonType("env", SingletonFactoryAdaptor(EnvSingleton))
} }