diff options
author | Colin Cross <ccross@android.com> | 2019-02-08 21:37:00 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-02-11 15:29:51 -0800 |
commit | c7e40aa5782121a98897197df4cb57a0349f29c8 (patch) | |
tree | bb6a077a3d516ccab984285a023cc3825bda2a41 /java/dexpreopt.go | |
parent | 580d2ce64206bf56d8f829691e5571cca61fb59a (diff) | |
download | android_build_soong-c7e40aa5782121a98897197df4cb57a0349f29c8.tar.gz android_build_soong-c7e40aa5782121a98897197df4cb57a0349f29c8.tar.bz2 android_build_soong-c7e40aa5782121a98897197df4cb57a0349f29c8.zip |
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
Diffstat (limited to 'java/dexpreopt.go')
-rw-r--r-- | java/dexpreopt.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/java/dexpreopt.go b/java/dexpreopt.go index 55662cf4..eef51a92 100644 --- a/java/dexpreopt.go +++ b/java/dexpreopt.go @@ -119,6 +119,11 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo 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 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo UsesLibraries: nil, LibraryPaths: nil, - Archs: archs, - DexPreoptImageLocation: "", + Archs: archs, + DexPreoptImages: images, PreoptExtractedApk: false, |