aboutsummaryrefslogtreecommitdiffstats
path: root/android/register.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/register.go')
-rw-r--r--android/register.go19
1 files changed, 2 insertions, 17 deletions
diff --git a/android/register.go b/android/register.go
index d6b290db..93966646 100644
--- a/android/register.go
+++ b/android/register.go
@@ -15,8 +15,6 @@
package android
import (
- "sync"
-
"github.com/google/blueprint"
)
@@ -51,8 +49,6 @@ func RegisterSingletonType(name string, factory blueprint.SingletonFactory) {
singletons = append(singletons, singleton{name, factory})
}
-var registerMutatorsOnce sync.Once
-
func NewContext() *blueprint.Context {
ctx := blueprint.NewContext()
@@ -64,19 +60,8 @@ func NewContext() *blueprint.Context {
ctx.RegisterSingletonType(t.name, t.factory)
}
- registerMutatorsOnce.Do(registerMutators)
-
- for _, t := range mutators {
- var handle blueprint.MutatorHandle
- if t.bottomUpMutator != nil {
- handle = ctx.RegisterBottomUpMutator(t.name, t.bottomUpMutator)
- } else if t.topDownMutator != nil {
- handle = ctx.RegisterTopDownMutator(t.name, t.topDownMutator)
- }
- if t.parallel {
- handle.Parallel()
- }
- }
+ registerMutators(ctx)
+
ctx.RegisterSingletonType("env", EnvSingleton)
return ctx