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
diff --git a/java/dexpreopt.go b/java/dexpreopt.go
index 40cfe4f..bf64ae8 100644
--- a/java/dexpreopt.go
+++ b/java/dexpreopt.go
@@ -155,6 +155,8 @@
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 @@
Archs: archs,
DexPreoptImages: images,
DexPreoptImagesDeps: imagesDeps,
- DexPreoptImageLocations: bootImage.imageLocations,
+ DexPreoptImageLocations: imageLocations,
PreoptBootClassPathDexFiles: dexFiles,
PreoptBootClassPathDexLocations: dexLocations,