Merge "Change OnlyPreoptBootImageAndSystemServer to OnlyPreoptArtBootImage." into main am: 34778a9301

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2822402

Change-Id: I7a3d9febdd7fbef957e3f295784776985aabf9c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-11-10 19:18:23 +00:00
committed by Automerger Merge Worker
5 changed files with 45 additions and 49 deletions

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}