Generate boot zip file from prebuilt_bootclasspath_fragment

Previously, the boot zip file, containing all the boot image files for
all the supported architectures, was only created from source. It was
not created when building from a prebuilt_bootclasspath_fragment. That
lead to build failures when building from ART prebuilts.

This change pulls the boot zip file creation out so that it can be done
for both source and prebuilt bootclasspath_fragment modules as well as
for the platform_bootclasspath module.

Bug: 192575099
Test: m out/target/product/generic_arm64/boot.zip
      m SOONG_CONFIG_art_module_source_build=false out/target/product/generic_arm64/boot.zip
      - Compare the output of the first command from before the change
        with the output from them both after and confirm that when the
        ART prebuilts are up to date with the source that there are no
        differences.
Change-Id: Ie7dd5e2ca4a865d06fd9ebf87320cf68c4d05bc3
This commit is contained in:
Paul Duffin
2021-07-01 22:04:22 +01:00
parent 4b51e27046
commit 56afb27fb0
3 changed files with 61 additions and 50 deletions

View File

@@ -437,7 +437,10 @@ func (b *platformBootclasspathModule) generateBootImageBuildActions(ctx android.
// Build a profile for the image config and then use that to build the boot image.
profile := bootImageProfileRule(ctx, imageConfig)
buildBootImage(ctx, imageConfig, profile)
bootImageFilesByArch := buildBootImage(ctx, imageConfig, profile)
// Zip the boot image files up.
buildBootImageZipInPredefinedLocation(ctx, imageConfig, bootImageFilesByArch)
dumpOatRules(ctx, imageConfig)
}