Generate a boot image extension for mainline BCP jars.

Bug: 269230245
Test: m
Test: atest art_standalone_dexpreopt_tests
Change-Id: I253c30d938eee2cf2549ec2338425d53956e7cbb
This commit is contained in:
Jiakai Zhang
2023-02-20 16:30:01 +00:00
parent d49324dadb
commit 3830308fb8
6 changed files with 519 additions and 13 deletions

View File

@@ -293,6 +293,12 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Wr
isSystemServerJar := global.AllSystemServerJars(ctx).ContainsJar(moduleName(ctx))
bootImage := defaultBootImageConfig(ctx)
// When `global.PreoptWithUpdatableBcp` is true, `bcpForDexpreopt` below includes the mainline
// boot jars into bootclasspath, so we should include the mainline boot image as well because it's
// generated from those jars.
if global.PreoptWithUpdatableBcp {
bootImage = mainlineBootImageConfig(ctx)
}
dexFiles, dexLocations := bcpForDexpreopt(ctx, global.PreoptWithUpdatableBcp)
targets := ctx.MultiTargets()