Update dexpreopt for the ART APEX name change.

Test: Build & boot
Bug: 135753770
Exempt-From-Owner-Approval: Approved internally
Change-Id: I3aac9112b022cce3ef8cfdf4bdbbed8bb0c8f4c7
Merged-In: I3aac9112b022cce3ef8cfdf4bdbbed8bb0c8f4c7
This commit is contained in:
Martin Stjernholm 2019-07-05 22:38:25 +01:00
parent 7153b767a5
commit cc4b0ad706
4 changed files with 13 additions and 13 deletions

View File

@ -68,7 +68,7 @@ func (c *Module) AndroidMk() android.AndroidMkData {
OutputFile: c.outputFile, OutputFile: c.outputFile,
// TODO(jiyong): add the APEXes providing shared libs to the required modules // TODO(jiyong): add the APEXes providing shared libs to the required modules
// Currently, adding c.Properties.ApexesProvidingSharedLibs is causing multiple // Currently, adding c.Properties.ApexesProvidingSharedLibs is causing multiple
// runtime APEXes (com.android.runtime.debug|release) to be installed. And this // ART APEXes (com.android.art.debug|release) to be installed. And this
// is breaking some older devices (like marlin) where system.img is small. // is breaking some older devices (like marlin) where system.img is small.
Required: c.Properties.AndroidMkRuntimeLibs, Required: c.Properties.AndroidMkRuntimeLibs,
Include: "$(BUILD_SYSTEM)/soong_cc_prebuilt.mk", Include: "$(BUILD_SYSTEM)/soong_cc_prebuilt.mk",

View File

@ -42,7 +42,7 @@ type GlobalConfig struct {
BootJars []string // modules for jars that form the boot class path BootJars []string // modules for jars that form the boot class path
RuntimeApexJars []string // modules for jars that are in the runtime apex ArtApexJars []string // modules for jars that are in the ART APEX
ProductUpdatableBootModules []string ProductUpdatableBootModules []string
ProductUpdatableBootLocations []string ProductUpdatableBootLocations []string
@ -292,7 +292,7 @@ func GlobalConfigForTests(ctx android.PathContext) GlobalConfig {
DisableGenerateProfile: false, DisableGenerateProfile: false,
ProfileDir: "", ProfileDir: "",
BootJars: nil, BootJars: nil,
RuntimeApexJars: nil, ArtApexJars: nil,
ProductUpdatableBootModules: nil, ProductUpdatableBootModules: nil,
ProductUpdatableBootLocations: nil, ProductUpdatableBootLocations: nil,
SystemServerJars: nil, SystemServerJars: nil,

View File

@ -48,7 +48,7 @@ func TestDexpreoptBootJars(t *testing.T) {
pathCtx := android.PathContextForTesting(config, nil) pathCtx := android.PathContextForTesting(config, nil)
dexpreoptConfig := dexpreopt.GlobalConfigForTests(pathCtx) dexpreoptConfig := dexpreopt.GlobalConfigForTests(pathCtx)
dexpreoptConfig.RuntimeApexJars = []string{"foo", "bar", "baz"} dexpreoptConfig.ArtApexJars = []string{"foo", "bar", "baz"}
setDexpreoptTestGlobalConfig(config, dexpreoptConfig) setDexpreoptTestGlobalConfig(config, dexpreoptConfig)
ctx := testContext(bp, nil) ctx := testContext(bp, nil)

View File

@ -107,17 +107,17 @@ func defaultBootImageConfig(ctx android.PathContext) bootImageConfig {
return ctx.Config().Once(defaultBootImageConfigKey, func() interface{} { return ctx.Config().Once(defaultBootImageConfigKey, func() interface{} {
global := dexpreoptGlobalConfig(ctx) global := dexpreoptGlobalConfig(ctx)
runtimeModules := global.RuntimeApexJars artModules := global.ArtApexJars
nonFrameworkModules := concat(runtimeModules, global.ProductUpdatableBootModules) nonFrameworkModules := concat(artModules, global.ProductUpdatableBootModules)
frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules) frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules)
var nonUpdatableBootModules []string var nonUpdatableBootModules []string
var nonUpdatableBootLocations []string var nonUpdatableBootLocations []string
for _, m := range runtimeModules { for _, m := range artModules {
nonUpdatableBootModules = append(nonUpdatableBootModules, m) nonUpdatableBootModules = append(nonUpdatableBootModules, m)
nonUpdatableBootLocations = append(nonUpdatableBootLocations, nonUpdatableBootLocations = append(nonUpdatableBootLocations,
filepath.Join("/apex/com.android.runtime/javalib", m+".jar")) filepath.Join("/apex/com.android.art/javalib", m+".jar"))
} }
for _, m := range frameworkModules { for _, m := range frameworkModules {
@ -176,16 +176,16 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig {
return ctx.Config().Once(apexBootImageConfigKey, func() interface{} { return ctx.Config().Once(apexBootImageConfigKey, func() interface{} {
global := dexpreoptGlobalConfig(ctx) global := dexpreoptGlobalConfig(ctx)
runtimeModules := global.RuntimeApexJars artModules := global.ArtApexJars
nonFrameworkModules := concat(runtimeModules, global.ProductUpdatableBootModules) nonFrameworkModules := concat(artModules, global.ProductUpdatableBootModules)
frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules) frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules)
imageModules := concat(runtimeModules, frameworkModules) imageModules := concat(artModules, frameworkModules)
var bootLocations []string var bootLocations []string
for _, m := range runtimeModules { for _, m := range artModules {
bootLocations = append(bootLocations, bootLocations = append(bootLocations,
filepath.Join("/apex/com.android.runtime/javalib", m+".jar")) filepath.Join("/apex/com.android.art/javalib", m+".jar"))
} }
for _, m := range frameworkModules { for _, m := range frameworkModules {