aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2020-02-07 14:12:52 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-02-07 14:12:52 +0000
commit396b950a1b4711eb3e52b58a227c1846dc493e17 (patch)
tree91e887f1f062c59d57a055fdd75955f38a9b5d98
parentf3c9d74cfa63e4e748e4519324e6e6ea58ac6830 (diff)
parent40139d6422114672770fc9051c346f8f1aba79d9 (diff)
downloadbuild_soong-396b950a1b4711eb3e52b58a227c1846dc493e17.tar.gz
build_soong-396b950a1b4711eb3e52b58a227c1846dc493e17.tar.bz2
build_soong-396b950a1b4711eb3e52b58a227c1846dc493e17.zip
Merge "Support dexpreopt against the primary boot image."
-rw-r--r--dexpreopt/config.go2
-rw-r--r--java/dexpreopt.go14
2 files changed, 14 insertions, 2 deletions
diff --git a/dexpreopt/config.go b/dexpreopt/config.go
index 2a929c53..720f79e2 100644
--- a/dexpreopt/config.go
+++ b/dexpreopt/config.go
@@ -30,6 +30,8 @@ type GlobalConfig struct {
OnlyPreoptBootImageAndSystemServer bool // only preopt jars in the boot image or system server
+ UseArtImage bool // use the art image (use other boot class path dex files without image)
+
GenerateApexImage bool // generate an extra boot image only containing jars from the runtime apex
UseApexImage bool // use the apex image by default
diff --git a/java/dexpreopt.go b/java/dexpreopt.go
index da686603..5faec081 100644
--- a/java/dexpreopt.go
+++ b/java/dexpreopt.go
@@ -106,8 +106,18 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo
global := dexpreoptGlobalConfig(ctx)
bootImage := defaultBootImageConfig(ctx)
+ dexFiles := bootImage.dexPathsDeps.Paths()
+ dexLocations := bootImage.dexLocationsDeps
+ if global.UseArtImage {
+ bootImage = artBootImageConfig(ctx)
+ }
if global.UseApexImage {
bootImage = frameworkJZBootImageConfig(ctx)
+ dexFiles = bootImage.dexPathsDeps.Paths()
+ dexLocations = bootImage.dexLocationsDeps
+ if global.UseArtImage {
+ bootImage = artJZBootImageConfig(ctx)
+ }
}
var archs []android.ArchType
@@ -178,8 +188,8 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo
DexPreoptImagesDeps: imagesDeps,
DexPreoptImageLocations: bootImage.imageLocations,
- PreoptBootClassPathDexFiles: bootImage.dexPathsDeps.Paths(),
- PreoptBootClassPathDexLocations: bootImage.dexLocationsDeps,
+ PreoptBootClassPathDexFiles: dexFiles,
+ PreoptBootClassPathDexLocations: dexLocations,
PreoptExtractedApk: false,