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_config.go b/java/dexpreopt_config.go
index ffce2a9..01a26ba 100644
--- a/java/dexpreopt_config.go
+++ b/java/dexpreopt_config.go
@@ -115,7 +115,6 @@
// ART config for the primary boot image in the ART apex.
// It includes the Core Libraries.
artCfg := bootImageConfig{
- extension: false,
name: artBootImageName,
stem: "boot",
installSubdir: artSubdir,
@@ -127,7 +126,7 @@
// Framework config for the boot image extension.
// It includes framework libraries and depends on the ART config.
frameworkCfg := bootImageConfig{
- extension: true,
+ extends: &artCfg,
name: frameworkBootImageName,
stem: "boot",
installSubdir: frameworkSubdir,
@@ -149,8 +148,6 @@
// expands to <stem>.art for primary image and <stem>-<1st module>.art for extension
imageName := c.firstModuleNameOrStem() + ".art"
- c.imageLocations = []string{c.dir.Join(ctx, "android", c.installSubdir, imageName).String()}
-
// The path to bootclasspath dex files needs to be known at module
// GenerateAndroidBuildAction time, before the bootclasspath modules have been compiled.
// Set up known paths for them, the singleton rules will copy them there.
@@ -182,7 +179,6 @@
for i := range targets {
frameworkCfg.variants[i].primaryImages = artCfg.variants[i].images
}
- frameworkCfg.imageLocations = append(artCfg.imageLocations, frameworkCfg.imageLocations...)
return configs
}).(map[string]*bootImageConfig)