Revert "Package dexpreopt artifacts for libcore jars in the ART apex."
This reverts commit d5df949385
.
Bug: 143594594
Bug: 143593500
Reason for revert: Some builds are failing.
Change-Id: I69986b472bce39266095e526fcd7ef5f48ece85e
Exempt-From-Owner-Approval: Going back to green.
This commit is contained in:
17
apex/apex.go
17
apex/apex.go
@@ -613,7 +613,6 @@ type apexBundle struct {
|
|||||||
|
|
||||||
testApex bool
|
testApex bool
|
||||||
vndkApex bool
|
vndkApex bool
|
||||||
artApex bool
|
|
||||||
|
|
||||||
// intermediate path for apex_manifest.json
|
// intermediate path for apex_manifest.json
|
||||||
manifestOut android.WritablePath
|
manifestOut android.WritablePath
|
||||||
@@ -1214,19 +1213,6 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
// Specific to the ART apex: dexpreopt artifacts for libcore Java libraries.
|
|
||||||
// Build rules are generated by the dexpreopt singleton, and here we access build artifacts
|
|
||||||
// via the global boot image config.
|
|
||||||
if a.artApex {
|
|
||||||
for arch, files := range java.DexpreoptedArtApexJars(ctx) {
|
|
||||||
dirInApex := filepath.Join("dexpreopt", arch.String())
|
|
||||||
for _, f := range files {
|
|
||||||
localModule := "dexpreopt_" + arch.String() + "_" + filepath.Base(f.String())
|
|
||||||
filesInfo = append(filesInfo, apexFile{f, localModule, dirInApex, etc, nil, nil})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if a.private_key_file == nil {
|
if a.private_key_file == nil {
|
||||||
ctx.PropertyErrorf("key", "private_key for %q could not be found", String(a.properties.Key))
|
ctx.PropertyErrorf("key", "private_key for %q could not be found", String(a.properties.Key))
|
||||||
return
|
return
|
||||||
@@ -1825,10 +1811,9 @@ func newApexBundle() *apexBundle {
|
|||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
|
|
||||||
func ApexBundleFactory(testApex bool, artApex bool) android.Module {
|
func ApexBundleFactory(testApex bool) android.Module {
|
||||||
bundle := newApexBundle()
|
bundle := newApexBundle()
|
||||||
bundle.testApex = testApex
|
bundle.testApex = testApex
|
||||||
bundle.artApex = artApex
|
|
||||||
return bundle
|
return bundle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -165,8 +165,6 @@ func (d *dexpreoptBootJars) GenerateBuildActions(ctx android.SingletonContext) {
|
|||||||
|
|
||||||
// Always create the default boot image first, to get a unique profile rule for all images.
|
// Always create the default boot image first, to get a unique profile rule for all images.
|
||||||
d.defaultBootImage = buildBootImage(ctx, defaultBootImageConfig(ctx))
|
d.defaultBootImage = buildBootImage(ctx, defaultBootImageConfig(ctx))
|
||||||
// Create boot image for the ART apex (build artifacts are accessed via the global boot image config).
|
|
||||||
buildBootImage(ctx, artBootImageConfig(ctx))
|
|
||||||
if global.GenerateApexImage {
|
if global.GenerateApexImage {
|
||||||
d.otherImages = append(d.otherImages, buildBootImage(ctx, apexBootImageConfig(ctx)))
|
d.otherImages = append(d.otherImages, buildBootImage(ctx, apexBootImageConfig(ctx)))
|
||||||
}
|
}
|
||||||
|
@@ -96,17 +96,15 @@ func dexpreoptTargets(ctx android.PathContext) []android.Target {
|
|||||||
return targets
|
return targets
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct a variant of the global config for dexpreopted bootclasspath jars. The variants differ
|
|
||||||
// in the list of input jars (libcore, framework, or both), in the naming scheme for the dexpreopt
|
|
||||||
// files (ART recognizes "apex" names as special), and whether to include a zip archive.
|
|
||||||
func getBootImageConfig(ctx android.PathContext, key android.OnceKey, name string,
|
func getBootImageConfig(ctx android.PathContext, key android.OnceKey, name string,
|
||||||
needZip bool, artApexJarsOnly bool) bootImageConfig {
|
needZip bool) bootImageConfig {
|
||||||
|
|
||||||
return ctx.Config().Once(key, func() interface{} {
|
return ctx.Config().Once(key, func() interface{} {
|
||||||
global := dexpreoptGlobalConfig(ctx)
|
global := dexpreoptGlobalConfig(ctx)
|
||||||
|
|
||||||
artModules := global.ArtApexJars
|
artModules := global.ArtApexJars
|
||||||
imageModules := artModules
|
nonFrameworkModules := concat(artModules, global.ProductUpdatableBootModules)
|
||||||
|
frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules)
|
||||||
|
imageModules := concat(artModules, frameworkModules)
|
||||||
|
|
||||||
var bootLocations []string
|
var bootLocations []string
|
||||||
|
|
||||||
@@ -115,19 +113,11 @@ func getBootImageConfig(ctx android.PathContext, key android.OnceKey, name strin
|
|||||||
filepath.Join("/apex/com.android.art/javalib", m+".jar"))
|
filepath.Join("/apex/com.android.art/javalib", m+".jar"))
|
||||||
}
|
}
|
||||||
|
|
||||||
if !artApexJarsOnly {
|
for _, m := range frameworkModules {
|
||||||
nonFrameworkModules := concat(artModules, global.ProductUpdatableBootModules)
|
bootLocations = append(bootLocations,
|
||||||
frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules)
|
filepath.Join("/system/framework", m+".jar"))
|
||||||
imageModules = concat(imageModules, frameworkModules)
|
|
||||||
|
|
||||||
for _, m := range frameworkModules {
|
|
||||||
bootLocations = append(bootLocations,
|
|
||||||
filepath.Join("/system/framework", m+".jar"))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dirStem := "dex_" + name + "jars"
|
|
||||||
|
|
||||||
// The path to bootclasspath dex files needs to be known at module GenerateAndroidBuildAction time, before
|
// The path to bootclasspath dex files needs to be known at module GenerateAndroidBuildAction time, before
|
||||||
// the bootclasspath modules have been compiled. Set up known paths for them, the singleton rules will copy
|
// the bootclasspath modules have been compiled. Set up known paths for them, the singleton rules will copy
|
||||||
// them there.
|
// them there.
|
||||||
@@ -135,11 +125,11 @@ func getBootImageConfig(ctx android.PathContext, key android.OnceKey, name strin
|
|||||||
var bootDexPaths android.WritablePaths
|
var bootDexPaths android.WritablePaths
|
||||||
for _, m := range imageModules {
|
for _, m := range imageModules {
|
||||||
bootDexPaths = append(bootDexPaths,
|
bootDexPaths = append(bootDexPaths,
|
||||||
android.PathForOutput(ctx, ctx.Config().DeviceName(), dirStem+"_input", m+".jar"))
|
android.PathForOutput(ctx, ctx.Config().DeviceName(), "dex_"+name+"jars_input", m+".jar"))
|
||||||
}
|
}
|
||||||
|
|
||||||
dir := android.PathForOutput(ctx, ctx.Config().DeviceName(), dirStem)
|
dir := android.PathForOutput(ctx, ctx.Config().DeviceName(), "dex_"+name+"jars")
|
||||||
symbolsDir := android.PathForOutput(ctx, ctx.Config().DeviceName(), dirStem+"_unstripped")
|
symbolsDir := android.PathForOutput(ctx, ctx.Config().DeviceName(), "dex_"+name+"jars_unstripped")
|
||||||
|
|
||||||
var zip android.WritablePath
|
var zip android.WritablePath
|
||||||
if needZip {
|
if needZip {
|
||||||
@@ -176,30 +166,15 @@ func getBootImageConfig(ctx android.PathContext, key android.OnceKey, name strin
|
|||||||
}).(bootImageConfig)
|
}).(bootImageConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default config is the one that goes in the system image. It includes both libcore and framework.
|
|
||||||
var defaultBootImageConfigKey = android.NewOnceKey("defaultBootImageConfig")
|
var defaultBootImageConfigKey = android.NewOnceKey("defaultBootImageConfig")
|
||||||
|
|
||||||
func defaultBootImageConfig(ctx android.PathContext) bootImageConfig {
|
|
||||||
return getBootImageConfig(ctx, defaultBootImageConfigKey, "boot", true, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apex config is used for the JIT-zygote experiment. It includes both libcore and framework, but AOT-compiles only libcore.
|
|
||||||
var apexBootImageConfigKey = android.NewOnceKey("apexBootImageConfig")
|
var apexBootImageConfigKey = android.NewOnceKey("apexBootImageConfig")
|
||||||
|
|
||||||
|
func defaultBootImageConfig(ctx android.PathContext) bootImageConfig {
|
||||||
|
return getBootImageConfig(ctx, defaultBootImageConfigKey, "boot", true)
|
||||||
|
}
|
||||||
|
|
||||||
func apexBootImageConfig(ctx android.PathContext) bootImageConfig {
|
func apexBootImageConfig(ctx android.PathContext) bootImageConfig {
|
||||||
return getBootImageConfig(ctx, apexBootImageConfigKey, "apex", false, false)
|
return getBootImageConfig(ctx, apexBootImageConfigKey, "apex", false)
|
||||||
}
|
|
||||||
|
|
||||||
// ART config is the one used for the ART apex. It includes only libcore.
|
|
||||||
var artBootImageConfigKey = android.NewOnceKey("artBootImageConfig")
|
|
||||||
|
|
||||||
func artBootImageConfig(ctx android.PathContext) bootImageConfig {
|
|
||||||
return getBootImageConfig(ctx, artBootImageConfigKey, "boot-art", false, true)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accessor function for the apex package.
|
|
||||||
func DexpreoptedArtApexJars(ctx android.BuilderContext) map[android.ArchType]android.Paths {
|
|
||||||
return artBootImageConfig(ctx).imagesDeps
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func defaultBootclasspath(ctx android.PathContext) []string {
|
func defaultBootclasspath(ctx android.PathContext) []string {
|
||||||
|
Reference in New Issue
Block a user