Merge "Consistently use either "boot" or "apex" boot image as the default." am: 13c929e32e
am: 292aed498c
Change-Id: I8845889cc81b480c2dec0972e06b69e4aa4c93c4
This commit is contained in:
@@ -101,10 +101,6 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo
|
|||||||
|
|
||||||
global := dexpreoptGlobalConfig(ctx)
|
global := dexpreoptGlobalConfig(ctx)
|
||||||
bootImage := defaultBootImageConfig(ctx)
|
bootImage := defaultBootImageConfig(ctx)
|
||||||
defaultBootImage := bootImage
|
|
||||||
if global.UseApexImage {
|
|
||||||
bootImage = apexBootImageConfig(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
var archs []android.ArchType
|
var archs []android.ArchType
|
||||||
for _, a := range ctx.MultiTargets() {
|
for _, a := range ctx.MultiTargets() {
|
||||||
@@ -174,11 +170,8 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo
|
|||||||
DexPreoptImagesDeps: imagesDeps,
|
DexPreoptImagesDeps: imagesDeps,
|
||||||
DexPreoptImageLocations: bootImage.imageLocations,
|
DexPreoptImageLocations: bootImage.imageLocations,
|
||||||
|
|
||||||
// We use the dex paths and dex locations of the default boot image, as it
|
PreoptBootClassPathDexFiles: bootImage.dexPathsDeps.Paths(),
|
||||||
// contains the full dexpreopt boot classpath. Other images may just contain a subset of
|
PreoptBootClassPathDexLocations: bootImage.dexLocationsDeps,
|
||||||
// the dexpreopt boot classpath.
|
|
||||||
PreoptBootClassPathDexFiles: defaultBootImage.dexPathsDeps.Paths(),
|
|
||||||
PreoptBootClassPathDexLocations: defaultBootImage.dexLocationsDeps,
|
|
||||||
|
|
||||||
PreoptExtractedApk: false,
|
PreoptExtractedApk: false,
|
||||||
|
|
||||||
|
@@ -220,15 +220,18 @@ func (d *dexpreoptBootJars) GenerateBuildActions(ctx android.SingletonContext) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always create the default boot image first, to get a unique profile rule for all images.
|
// Default boot image is either the framework one, or the JIT-zygote one.
|
||||||
d.defaultBootImage = buildBootImage(ctx, defaultBootImageConfig(ctx))
|
// The boot image that is created first is used to get a unique profile rule for all images.
|
||||||
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 {
|
if global.GenerateApexImage {
|
||||||
// Create boot images for the JIT-zygote experiment.
|
d.defaultBootImage = buildBootImage(ctx, apexBootImageConfig(ctx))
|
||||||
d.otherImages = append(d.otherImages, 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.
|
||||||
|
if !skipDexpreoptArtBootJars(ctx) {
|
||||||
|
d.otherImages = append(d.otherImages, buildBootImage(ctx, artBootImageConfig(ctx)))
|
||||||
}
|
}
|
||||||
|
|
||||||
dumpOatRules(ctx, d.defaultBootImage)
|
dumpOatRules(ctx, d.defaultBootImage)
|
||||||
|
@@ -234,7 +234,7 @@ func artBootImageConfig(ctx android.PathContext) bootImageConfig {
|
|||||||
return *genBootImageConfigs(ctx)[artBootImageName]
|
return *genBootImageConfigs(ctx)[artBootImageName]
|
||||||
}
|
}
|
||||||
|
|
||||||
func defaultBootImageConfig(ctx android.PathContext) bootImageConfig {
|
func frameworkBootImageConfig(ctx android.PathContext) bootImageConfig {
|
||||||
return *genBootImageConfigs(ctx)[frameworkBootImageName]
|
return *genBootImageConfigs(ctx)[frameworkBootImageName]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,6 +242,14 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig {
|
|||||||
return *genBootImageConfigs(ctx)[apexBootImageName]
|
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 {
|
func defaultBootclasspath(ctx android.PathContext) []string {
|
||||||
return ctx.Config().OnceStringSlice(defaultBootclasspathKey, func() []string {
|
return ctx.Config().OnceStringSlice(defaultBootclasspathKey, func() []string {
|
||||||
global := dexpreoptGlobalConfig(ctx)
|
global := dexpreoptGlobalConfig(ctx)
|
||||||
|
Reference in New Issue
Block a user