Use OnceKey in art.go
Once is changing to take a type-safe key, use android.NewOnceKey
in art.go.
Test: m checkbuild
diff --git a/build/art.go b/build/art.go
index 5236e31..2ec1917 100644
--- a/build/art.go
+++ b/build/art.go
@@ -253,8 +253,10 @@
ctx.AppendProperties(p)
}
+var testMapKey = android.NewOnceKey("artTests")
+
func testMap(config android.Config) map[string][]string {
- return config.Once("artTests", func() interface{} {
+ return config.Once(testMapKey, func() interface{} {
return make(map[string][]string)
}).(map[string][]string)
}
@@ -356,7 +358,7 @@
func libartStaticDefaultsFactory() android.Module {
c := &codegenProperties{}
module := cc.DefaultsFactory(c)
- android.AddLoadHook(module, func(ctx android.LoadHookContext) { codegen(ctx, c, true) })
+ android.AddLoadHook(module, func(ctx android.LoadHookContext) { codegen(ctx, c, true) })
return module
}