diff options
author | 2016-09-13 13:41:03 -0700 | |
---|---|---|
committer | 2016-09-13 13:41:03 -0700 | |
commit | 6e511782ec2796cd187ee7bc1bce82b35f5d9092 (patch) | |
tree | cdc388657ef9118fa40f92d9887aec26d58c8ba0 /build/codegen.go | |
parent | 54ec35e4295b83939d7213d8fc73b065c6a2c1d1 (diff) |
Update art to use hooks instead of customizer
Change-Id: I46de5ea6ffbc0e32a0b306b8fe82b66b986e33cd
Diffstat (limited to 'build/codegen.go')
-rw-r--r-- | build/codegen.go | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/build/codegen.go b/build/codegen.go index fde9420039..d98ca4fd4f 100644 --- a/build/codegen.go +++ b/build/codegen.go @@ -24,9 +24,7 @@ import ( "strings" ) -func (a *codegenCustomizer) CustomizeProperties(ctx android.CustomizePropertiesContext) { - c := &a.codegenProperties.Codegen - +func codegen(ctx android.LoadHookContext, c *codegenProperties) { var hostArches, deviceArches []string e := envDefault(ctx, "ART_HOST_CODEGEN_ARCHS", "") @@ -53,17 +51,17 @@ func (a *codegenCustomizer) CustomizeProperties(ctx android.CustomizePropertiesC addCodegenArchProperties := func(p *props, hod **codegenArchProperties, arch string) { switch arch { case "arm": - *hod = &c.Arm + *hod = &c.Codegen.Arm case "arm64": - *hod = &c.Arm64 + *hod = &c.Codegen.Arm64 case "mips": - *hod = &c.Mips + *hod = &c.Codegen.Mips case "mips64": - *hod = &c.Mips64 + *hod = &c.Codegen.Mips64 case "x86": - *hod = &c.X86 + *hod = &c.Codegen.X86 case "x86_64": - *hod = &c.X86_64 + *hod = &c.Codegen.X86_64 default: ctx.ModuleErrorf("Unknown codegen architecture %q", arch) return @@ -109,7 +107,7 @@ type codegenCustomizer struct { codegenProperties codegenProperties } -func defaultDeviceCodegenArches(ctx android.CustomizePropertiesContext) []string { +func defaultDeviceCodegenArches(ctx android.LoadHookContext) []string { arches := make(map[string]bool) for _, a := range ctx.DeviceConfig().Arches() { s := a.ArchType.String() |