Loading dexpreopt/config.go +40 −40 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ type GlobalConfig struct { DisablePreoptBootImages bool // disable prepot for boot images DisablePreoptModules []string // modules with preopt disabled by product-specific config OnlyPreoptBootImageAndSystemServer bool // only preopt jars in the boot image or system server OnlyPreoptArtBootImage bool // only preopt jars in the ART boot image PreoptWithUpdatableBcp bool // If updatable boot jars are included in dexpreopt or not. Loading Loading @@ -693,7 +693,7 @@ func GlobalConfigForTests(ctx android.PathContext) *GlobalConfig { return &GlobalConfig{ DisablePreopt: false, DisablePreoptModules: nil, OnlyPreoptBootImageAndSystemServer: false, OnlyPreoptArtBootImage: false, HasSystemOther: false, PatternsOnSystemOther: nil, DisableGenerateProfile: false, Loading dexpreopt/dexpreopt.go +1 −6 Original line number Diff line number Diff line Loading @@ -124,12 +124,7 @@ func dexpreoptDisabled(ctx android.PathContext, global *GlobalConfig, module *Mo return true } // If OnlyPreoptBootImageAndSystemServer=true and module is not in boot class path skip // Also preopt system server jars since selinux prevents system server from loading anything from // /data. If we don't do this they will need to be extracted which is not favorable for RAM usage // or performance. If PreoptExtractedApk is true, we ignore the only preopt boot image options. if global.OnlyPreoptBootImageAndSystemServer && !global.BootJars.ContainsJar(module.Name) && !global.AllSystemServerJars(ctx).ContainsJar(module.Name) && !module.PreoptExtractedApk { if global.OnlyPreoptArtBootImage && !module.PreoptExtractedApk { return true } Loading java/app.go +1 −1 Original line number Diff line number Diff line Loading @@ -1584,7 +1584,7 @@ func (u *usesLibrary) verifyUsesLibraries(ctx android.ModuleContext, inputFile a // non-linux build platforms where dexpreopt is generally disabled (the check may fail due to // various unrelated reasons, such as a failure to get manifest from an APK). global := dexpreopt.GetGlobalConfig(ctx) if global.DisablePreopt || global.OnlyPreoptBootImageAndSystemServer { if global.DisablePreopt || global.OnlyPreoptArtBootImage { return inputFile } Loading java/dexpreopt_bootjars.go +2 −1 Original line number Diff line number Diff line Loading @@ -610,7 +610,8 @@ func generateBootImage(ctx android.ModuleContext, imageConfig *bootImageConfig) profile := bootImageProfileRule(ctx, imageConfig) // If dexpreopt of boot image jars should be skipped, stop after generating a profile. if SkipDexpreoptBootJars(ctx) { global := dexpreopt.GetGlobalConfig(ctx) if SkipDexpreoptBootJars(ctx) || (global.OnlyPreoptArtBootImage && imageConfig.name != "art") { return } Loading java/dexpreopt_check.go +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ func (m *dexpreoptSystemserverCheck) GenerateAndroidBuildActions(ctx android.Mod // The check should be skipped on unbundled builds because system server jars are not preopted on // unbundled builds since the artifacts are installed into the system image, not the APEXes. if global.DisablePreopt || len(targets) == 0 || ctx.Config().UnbundledBuild() { if global.DisablePreopt || global.OnlyPreoptArtBootImage || len(targets) == 0 || ctx.Config().UnbundledBuild() { return } Loading Loading
dexpreopt/config.go +40 −40 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ type GlobalConfig struct { DisablePreoptBootImages bool // disable prepot for boot images DisablePreoptModules []string // modules with preopt disabled by product-specific config OnlyPreoptBootImageAndSystemServer bool // only preopt jars in the boot image or system server OnlyPreoptArtBootImage bool // only preopt jars in the ART boot image PreoptWithUpdatableBcp bool // If updatable boot jars are included in dexpreopt or not. Loading Loading @@ -693,7 +693,7 @@ func GlobalConfigForTests(ctx android.PathContext) *GlobalConfig { return &GlobalConfig{ DisablePreopt: false, DisablePreoptModules: nil, OnlyPreoptBootImageAndSystemServer: false, OnlyPreoptArtBootImage: false, HasSystemOther: false, PatternsOnSystemOther: nil, DisableGenerateProfile: false, Loading
dexpreopt/dexpreopt.go +1 −6 Original line number Diff line number Diff line Loading @@ -124,12 +124,7 @@ func dexpreoptDisabled(ctx android.PathContext, global *GlobalConfig, module *Mo return true } // If OnlyPreoptBootImageAndSystemServer=true and module is not in boot class path skip // Also preopt system server jars since selinux prevents system server from loading anything from // /data. If we don't do this they will need to be extracted which is not favorable for RAM usage // or performance. If PreoptExtractedApk is true, we ignore the only preopt boot image options. if global.OnlyPreoptBootImageAndSystemServer && !global.BootJars.ContainsJar(module.Name) && !global.AllSystemServerJars(ctx).ContainsJar(module.Name) && !module.PreoptExtractedApk { if global.OnlyPreoptArtBootImage && !module.PreoptExtractedApk { return true } Loading
java/app.go +1 −1 Original line number Diff line number Diff line Loading @@ -1584,7 +1584,7 @@ func (u *usesLibrary) verifyUsesLibraries(ctx android.ModuleContext, inputFile a // non-linux build platforms where dexpreopt is generally disabled (the check may fail due to // various unrelated reasons, such as a failure to get manifest from an APK). global := dexpreopt.GetGlobalConfig(ctx) if global.DisablePreopt || global.OnlyPreoptBootImageAndSystemServer { if global.DisablePreopt || global.OnlyPreoptArtBootImage { return inputFile } Loading
java/dexpreopt_bootjars.go +2 −1 Original line number Diff line number Diff line Loading @@ -610,7 +610,8 @@ func generateBootImage(ctx android.ModuleContext, imageConfig *bootImageConfig) profile := bootImageProfileRule(ctx, imageConfig) // If dexpreopt of boot image jars should be skipped, stop after generating a profile. if SkipDexpreoptBootJars(ctx) { global := dexpreopt.GetGlobalConfig(ctx) if SkipDexpreoptBootJars(ctx) || (global.OnlyPreoptArtBootImage && imageConfig.name != "art") { return } Loading
java/dexpreopt_check.go +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ func (m *dexpreoptSystemserverCheck) GenerateAndroidBuildActions(ctx android.Mod // The check should be skipped on unbundled builds because system server jars are not preopted on // unbundled builds since the artifacts are installed into the system image, not the APEXes. if global.DisablePreopt || len(targets) == 0 || ctx.Config().UnbundledBuild() { if global.DisablePreopt || global.OnlyPreoptArtBootImage || len(targets) == 0 || ctx.Config().UnbundledBuild() { return } Loading