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
This commit is contained in:
David Srbecky
2020-03-26 11:10:45 +00:00
parent 5e9cf02ab5
commit 1aacc6c3df
3 changed files with 42 additions and 46 deletions

View File

@@ -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,