Revert "Consistently use either "boot" or "apex" boot image as the default."
This reverts commit 48b3b3c71f
.
Reason for revert: breaks emulator
BUG: 146558375
Change-Id: I2af3d11ad9a014b0d73a73540bc814f245bc6418
This commit is contained in:
parent
48b3b3c71f
commit
54191fae42
3 changed files with 17 additions and 21 deletions
|
@ -101,6 +101,10 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo
|
|||
|
||||
global := dexpreoptGlobalConfig(ctx)
|
||||
bootImage := defaultBootImageConfig(ctx)
|
||||
defaultBootImage := bootImage
|
||||
if global.UseApexImage {
|
||||
bootImage = apexBootImageConfig(ctx)
|
||||
}
|
||||
|
||||
var archs []android.ArchType
|
||||
for _, a := range ctx.MultiTargets() {
|
||||
|
@ -170,8 +174,11 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo
|
|||
DexPreoptImagesDeps: imagesDeps,
|
||||
DexPreoptImageLocations: bootImage.imageLocations,
|
||||
|
||||
PreoptBootClassPathDexFiles: bootImage.dexPathsDeps.Paths(),
|
||||
PreoptBootClassPathDexLocations: bootImage.dexLocationsDeps,
|
||||
// We use the dex paths and dex locations of the default boot image, as it
|
||||
// contains the full dexpreopt boot classpath. Other images may just contain a subset of
|
||||
// the dexpreopt boot classpath.
|
||||
PreoptBootClassPathDexFiles: defaultBootImage.dexPathsDeps.Paths(),
|
||||
PreoptBootClassPathDexLocations: defaultBootImage.dexLocationsDeps,
|
||||
|
||||
PreoptExtractedApk: false,
|
||||
|
||||
|
|
|
@ -220,19 +220,16 @@ func (d *dexpreoptBootJars) GenerateBuildActions(ctx android.SingletonContext) {
|
|||
return
|
||||
}
|
||||
|
||||
// Default boot image is either the framework one, or the JIT-zygote one.
|
||||
// The boot image that is created first is used to get a unique profile rule for all images.
|
||||
if global.GenerateApexImage {
|
||||
d.defaultBootImage = buildBootImage(ctx, apexBootImageConfig(ctx))
|
||||
d.otherImages = append(d.otherImages, buildBootImage(ctx, frameworkBootImageConfig(ctx)))
|
||||
} else {
|
||||
d.defaultBootImage = buildBootImage(ctx, frameworkBootImageConfig(ctx))
|
||||
}
|
||||
|
||||
// Create the ART boot image.
|
||||
// Always create the default boot image first, to get a unique profile rule for all images.
|
||||
d.defaultBootImage = buildBootImage(ctx, defaultBootImageConfig(ctx))
|
||||
if !skipDexpreoptArtBootJars(ctx) {
|
||||
// Create boot image for the ART apex (build artifacts are accessed via the global boot image config).
|
||||
d.otherImages = append(d.otherImages, buildBootImage(ctx, artBootImageConfig(ctx)))
|
||||
}
|
||||
if global.GenerateApexImage {
|
||||
// Create boot images for the JIT-zygote experiment.
|
||||
d.otherImages = append(d.otherImages, buildBootImage(ctx, apexBootImageConfig(ctx)))
|
||||
}
|
||||
|
||||
dumpOatRules(ctx, d.defaultBootImage)
|
||||
}
|
||||
|
|
|
@ -234,7 +234,7 @@ func artBootImageConfig(ctx android.PathContext) bootImageConfig {
|
|||
return *genBootImageConfigs(ctx)[artBootImageName]
|
||||
}
|
||||
|
||||
func frameworkBootImageConfig(ctx android.PathContext) bootImageConfig {
|
||||
func defaultBootImageConfig(ctx android.PathContext) bootImageConfig {
|
||||
return *genBootImageConfigs(ctx)[frameworkBootImageName]
|
||||
}
|
||||
|
||||
|
@ -242,14 +242,6 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig {
|
|||
return *genBootImageConfigs(ctx)[apexBootImageName]
|
||||
}
|
||||
|
||||
func defaultBootImageConfig(ctx android.PathContext) bootImageConfig {
|
||||
if dexpreoptGlobalConfig(ctx).UseApexImage {
|
||||
return apexBootImageConfig(ctx)
|
||||
} else {
|
||||
return frameworkBootImageConfig(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
func defaultBootclasspath(ctx android.PathContext) []string {
|
||||
return ctx.Config().OnceStringSlice(defaultBootclasspathKey, func() []string {
|
||||
global := dexpreoptGlobalConfig(ctx)
|
||||
|
|
Loading…
Reference in a new issue