diff options
author | 2020-03-26 11:10:45 +0000 | |
---|---|---|
committer | 2020-03-26 15:28:27 +0000 | |
commit | 1aacc6c3df309463839cbd43a1f638eef97c685c (patch) | |
tree | 63231cca5694420c6624468bb1451a92c2b5d26a /java/dexpreopt.go | |
parent | 5e9cf02ab545072ec68b593a3ea1589055fdd319 (diff) |
Fix dump-oat-boot build target.
Implement support of dumping host boot.art.
That was not possible before because imageLocation is different on host.
This CL makes imageLocation per-variant so can access for the host variant.
Test: m dump-oat-boot
Change-Id: Id82161e4901a6b77f220238aec460b8609fd765f
Diffstat (limited to 'java/dexpreopt.go')
-rw-r--r-- | java/dexpreopt.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/java/dexpreopt.go b/java/dexpreopt.go index 40cfe4f5d..bf64ae852 100644 --- a/java/dexpreopt.go +++ b/java/dexpreopt.go @@ -155,6 +155,8 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo images = append(images, variant.images) imagesDeps = append(imagesDeps, variant.imagesDeps) } + // The locations for all Android targets are identical. Pick the first one. + imageLocations := bootImage.getVariant(targets[0]).imageLocations() dexLocation := android.InstallPathToOnDevicePath(ctx, d.installPath) @@ -198,7 +200,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo Archs: archs, DexPreoptImages: images, DexPreoptImagesDeps: imagesDeps, - DexPreoptImageLocations: bootImage.imageLocations, + DexPreoptImageLocations: imageLocations, PreoptBootClassPathDexFiles: dexFiles, PreoptBootClassPathDexLocations: dexLocations, |