Merge "Only get dexpreopt config for device modules" am: c01a5cd705
am: ceb543994b
am: c86a100751
am: 7dfbf703ff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1908170 Change-Id: I5b367850ae9699e5368ba48183d60ed85e2183f0
This commit is contained in:
@@ -122,13 +122,7 @@ func moduleName(ctx android.BaseModuleContext) string {
|
||||
}
|
||||
|
||||
func (d *dexpreopter) dexpreoptDisabled(ctx android.BaseModuleContext) bool {
|
||||
global := dexpreopt.GetGlobalConfig(ctx)
|
||||
|
||||
if global.DisablePreopt {
|
||||
return true
|
||||
}
|
||||
|
||||
if inList(moduleName(ctx), global.DisablePreoptModules) {
|
||||
if !ctx.Device() {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -144,7 +138,17 @@ func (d *dexpreopter) dexpreoptDisabled(ctx android.BaseModuleContext) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
if ctx.Host() {
|
||||
if !android.IsModulePreferred(ctx.Module()) {
|
||||
return true
|
||||
}
|
||||
|
||||
global := dexpreopt.GetGlobalConfig(ctx)
|
||||
|
||||
if global.DisablePreopt {
|
||||
return true
|
||||
}
|
||||
|
||||
if inList(moduleName(ctx), global.DisablePreoptModules) {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -161,10 +165,6 @@ func (d *dexpreopter) dexpreoptDisabled(ctx android.BaseModuleContext) bool {
|
||||
}
|
||||
}
|
||||
|
||||
if !android.IsModulePreferred(ctx.Module()) {
|
||||
return true
|
||||
}
|
||||
|
||||
// TODO: contains no java code
|
||||
|
||||
return false
|
||||
|
Reference in New Issue
Block a user