From cc4b0ad70633e729fd86332113678bb728bac654 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Fri, 5 Jul 2019 22:38:25 +0100 Subject: [PATCH] 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 --- cc/androidmk.go | 2 +- dexpreopt/config.go | 4 ++-- java/dexpreopt_bootjars_test.go | 2 +- java/dexpreopt_config.go | 18 +++++++++--------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cc/androidmk.go b/cc/androidmk.go index 272d3d443..4b0cb31dc 100644 --- a/cc/androidmk.go +++ b/cc/androidmk.go @@ -68,7 +68,7 @@ func (c *Module) AndroidMk() android.AndroidMkData { OutputFile: c.outputFile, // TODO(jiyong): add the APEXes providing shared libs to the required modules // 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. Required: c.Properties.AndroidMkRuntimeLibs, Include: "$(BUILD_SYSTEM)/soong_cc_prebuilt.mk", diff --git a/dexpreopt/config.go b/dexpreopt/config.go index 51f551998..f39ec4aa3 100644 --- a/dexpreopt/config.go +++ b/dexpreopt/config.go @@ -42,7 +42,7 @@ type GlobalConfig struct { 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 ProductUpdatableBootLocations []string @@ -292,7 +292,7 @@ func GlobalConfigForTests(ctx android.PathContext) GlobalConfig { DisableGenerateProfile: false, ProfileDir: "", BootJars: nil, - RuntimeApexJars: nil, + ArtApexJars: nil, ProductUpdatableBootModules: nil, ProductUpdatableBootLocations: nil, SystemServerJars: nil, diff --git a/java/dexpreopt_bootjars_test.go b/java/dexpreopt_bootjars_test.go index 4c38399d3..244bd5249 100644 --- a/java/dexpreopt_bootjars_test.go +++ b/java/dexpreopt_bootjars_test.go @@ -48,7 +48,7 @@ func TestDexpreoptBootJars(t *testing.T) { pathCtx := android.PathContextForTesting(config, nil) dexpreoptConfig := dexpreopt.GlobalConfigForTests(pathCtx) - dexpreoptConfig.RuntimeApexJars = []string{"foo", "bar", "baz"} + dexpreoptConfig.ArtApexJars = []string{"foo", "bar", "baz"} setDexpreoptTestGlobalConfig(config, dexpreoptConfig) ctx := testContext(bp, nil) diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go index 4a4d6d573..8c699b83a 100644 --- a/java/dexpreopt_config.go +++ b/java/dexpreopt_config.go @@ -107,17 +107,17 @@ func defaultBootImageConfig(ctx android.PathContext) bootImageConfig { return ctx.Config().Once(defaultBootImageConfigKey, func() interface{} { global := dexpreoptGlobalConfig(ctx) - runtimeModules := global.RuntimeApexJars - nonFrameworkModules := concat(runtimeModules, global.ProductUpdatableBootModules) + artModules := global.ArtApexJars + nonFrameworkModules := concat(artModules, global.ProductUpdatableBootModules) frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules) var nonUpdatableBootModules []string var nonUpdatableBootLocations []string - for _, m := range runtimeModules { + for _, m := range artModules { nonUpdatableBootModules = append(nonUpdatableBootModules, m) 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 { @@ -176,16 +176,16 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig { return ctx.Config().Once(apexBootImageConfigKey, func() interface{} { global := dexpreoptGlobalConfig(ctx) - runtimeModules := global.RuntimeApexJars - nonFrameworkModules := concat(runtimeModules, global.ProductUpdatableBootModules) + artModules := global.ArtApexJars + nonFrameworkModules := concat(artModules, global.ProductUpdatableBootModules) frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules) - imageModules := concat(runtimeModules, frameworkModules) + imageModules := concat(artModules, frameworkModules) var bootLocations []string - for _, m := range runtimeModules { + for _, m := range artModules { 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 {