Convert a missed Singleton am: 54855ddca4 am: eb2f0d255e

am: a47ca2855f

Change-Id: Ib70434c120619239361bcc9a0fa098b11d5949f9
This commit is contained in:
Colin Cross 2017-11-30 01:02:45 +00:00 committed by android-build-merger
commit 4b24c1ab4d
3 changed files with 4 additions and 6 deletions

View File

@ -19,8 +19,6 @@ import (
"strings"
"android/soong/env"
"github.com/google/blueprint"
)
// This file supports dependencies on environment variables. During build manifest generation,
@ -43,13 +41,13 @@ func init() {
os.Clearenv()
}
func EnvSingleton() blueprint.Singleton {
func EnvSingleton() Singleton {
return &envSingleton{}
}
type envSingleton struct{}
func (c *envSingleton) GenerateBuildActions(ctx blueprint.SingletonContext) {
func (c *envSingleton) GenerateBuildActions(ctx SingletonContext) {
envDeps := ctx.Config().(Config).EnvDeps()
envFile := PathForOutput(ctx, ".soong.environment")

View File

@ -99,5 +99,5 @@ func (ctx *Context) Register() {
registerMutators(ctx.Context, preArch, preDeps, postDeps)
ctx.RegisterSingletonType("env", EnvSingleton)
ctx.RegisterSingletonType("env", SingletonFactoryAdaptor(EnvSingleton))
}

View File

@ -61,7 +61,7 @@ func (ctx *TestContext) PostDepsMutators(f RegisterMutatorFunc) {
func (ctx *TestContext) Register() {
registerMutators(ctx.Context, ctx.preArch, ctx.preDeps, ctx.postDeps)
ctx.RegisterSingletonType("env", EnvSingleton)
ctx.RegisterSingletonType("env", SingletonFactoryAdaptor(EnvSingleton))
}
func (ctx *TestContext) ModuleForTests(name, variant string) TestingModule {