Export art dexpreopt image zip file
Test: m out/target/product/generic_arm64/boot.zip
Bug: 144491400
Change-Id: I84342703ac614e072b0cde8c6f5597dc8cffbc65
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index 5e72cee..280ce8c 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -217,7 +217,7 @@
// Always create the default boot image first, to get a unique profile rule for all images.
d.defaultBootImage = buildBootImage(ctx, defaultBootImageConfig(ctx))
// Create boot image for the ART apex (build artifacts are accessed via the global boot image config).
- buildBootImage(ctx, artBootImageConfig(ctx))
+ d.otherImages = append(d.otherImages, buildBootImage(ctx, artBootImageConfig(ctx)))
if global.GenerateApexImage {
// Create boot images for the JIT-zygote experiment.
d.otherImages = append(d.otherImages, buildBootImage(ctx, apexBootImageConfig(ctx)))
@@ -598,7 +598,6 @@
ctx.Strict("DEXPREOPT_BOOTCLASSPATH_DEX_FILES", strings.Join(image.dexPathsDeps.Strings(), " "))
ctx.Strict("DEXPREOPT_BOOTCLASSPATH_DEX_LOCATIONS", strings.Join(image.dexLocationsDeps, " "))
ctx.Strict("DEXPREOPT_IMAGE_LOCATIONS", strings.Join(image.imageLocations, ":"))
- ctx.Strict("DEXPREOPT_IMAGE_ZIP_"+image.name, image.zip.String())
var imageNames []string
for _, current := range append(d.otherImages, image) {
@@ -619,6 +618,8 @@
if current.zip != nil {
}
}
+
+ ctx.Strict("DEXPREOPT_IMAGE_ZIP_"+current.name, current.zip.String())
}
ctx.Strict("DEXPREOPT_IMAGE_NAMES", strings.Join(imageNames, " "))
}
diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go
index 57a770e..fd1cfd4 100644
--- a/java/dexpreopt_config.go
+++ b/java/dexpreopt_config.go
@@ -226,12 +226,13 @@
c.images[arch] = imageDir.Join(ctx, imageName)
c.imagesDeps[arch] = c.moduleFiles(ctx, imageDir, ".art", ".oat", ".vdex")
}
+
+ c.zip = c.dir.Join(ctx, c.name+".zip")
}
// specific to the framework config
frameworkCfg.dexPathsDeps = append(artCfg.dexPathsDeps, frameworkCfg.dexPathsDeps...)
frameworkCfg.imageLocations = append(artCfg.imageLocations, frameworkCfg.imageLocations...)
- frameworkCfg.zip = frameworkCfg.dir.Join(ctx, frameworkCfg.stem+".zip")
return configs
}).(map[string]*bootImageConfig)