Move dexpreopt image selection out of dexpreopt package
Instead of passing both the module and global dexpreopt image
selection into the dexpreopt package, determine the correct
dexpreopt image in the java package.
Also stop using the boot image "location" as an input, only
track the real path, and then convert it to the "location"
that dex2oat expects when constructing the command line.
Test: m checkbuild
Change-Id: I2be2b5917e09fd57428dab27849c0153fdc75722
diff --git a/java/dexpreopt.go b/java/dexpreopt.go
index 55662cf..eef51a9 100644
--- a/java/dexpreopt.go
+++ b/java/dexpreopt.go
@@ -119,6 +119,11 @@
archs = archs[:1]
}
+ var images []string
+ for _, arch := range archs {
+ images = append(images, globalConfig.DefaultDexPreoptImage[arch])
+ }
+
dexLocation := android.InstallPathToOnDevicePath(ctx, d.installPath)
strippedDexJarFile := android.PathForModuleOut(ctx, "dexpreopt", dexJarFile.Base())
@@ -161,8 +166,8 @@
UsesLibraries: nil,
LibraryPaths: nil,
- Archs: archs,
- DexPreoptImageLocation: "",
+ Archs: archs,
+ DexPreoptImages: images,
PreoptExtractedApk: false,