Use ArchType in dexpreopt config am: 74ba962d29 am: 97e623455c

am: e7e62af172

Change-Id: Ia2adcde5bfda51856dbc9c7bd6e0d374f3021631
This commit is contained in:
Colin Cross
2019-02-12 17:32:11 -08:00
committed by android-build-merger
5 changed files with 36 additions and 15 deletions

View File

@@ -100,14 +100,14 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo
return dexpreopt.GlobalConfig{}
}).(dexpreopt.GlobalConfig)
var archs []string
var archs []android.ArchType
for _, a := range ctx.MultiTargets() {
archs = append(archs, a.Arch.ArchType.String())
archs = append(archs, a.Arch.ArchType)
}
if len(archs) == 0 {
// assume this is a java library, dexpreopt for all arches for now
for _, target := range ctx.Config().Targets[android.Android] {
archs = append(archs, target.Arch.ArchType.String())
archs = append(archs, target.Arch.ArchType)
}
if inList(ctx.ModuleName(), globalConfig.SystemServerJars) && !d.isSDKLibrary {
// If the module is not an SDK library and it's a system server jar, only preopt the primary arch.