Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 580d2ce6 authored by Colin Cross's avatar Colin Cross
Browse files

Run makevars singleton after all other registered singletons

Move the makevars singleton after all dyamically registered
singletons, but before the env singleton, to ensure that it
can reference values initialized in other singletons.

Test: m checkbuild
Change-Id: I6ea45d3a174b94d4e89f3168894399e7022733e4
parent e48ff5bb
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -92,10 +92,6 @@ func RegisterMakeVarsProvider(pctx PackageContext, provider MakeVarsProvider) {

///////////////////////////////////////////////////////////////////////////////

func init() {
	RegisterSingletonType("makevars", makeVarsSingletonFunc)
}

func makeVarsSingletonFunc() Singleton {
	return &makeVarsSingleton{}
}
+4 −0
Original line number Diff line number Diff line
@@ -99,5 +99,9 @@ func (ctx *Context) Register() {

	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))
}