From a56be7d7815ad164cdd854f8fc6b1cbc3bbf1918 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 2 Jul 2021 13:00:43 +0100 Subject: Generate boot images for host from prebuilts Previously, when building from prebuilts boot no rules were created to produce the boot image files for the host, i.e. the OS on which the build was running. That caused problems with checkbuilds. No rules were produced as there was no host variant of a prebuilt apex to provide them. This change restructures the code to allow the prebuilt bootclasspath fragment to build the host variants of the files from the dex files provided by the prebuilt APEX. The generated files will not be the same as they would be if built from source as there is no boot image profile to use but it should be sufficient to satisfy the checkbuild target and allow for host side testing. Bug: 192575099 Test: m SOONG_CONFIG_art_module_source_build=false droid dist checkbuild Change-Id: I6af00f19bb71aa18dd462f5eac6aa38e3e721023 --- java/platform_bootclasspath.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'java/platform_bootclasspath.go') diff --git a/java/platform_bootclasspath.go b/java/platform_bootclasspath.go index 3160a27e1..c1e14b21e 100644 --- a/java/platform_bootclasspath.go +++ b/java/platform_bootclasspath.go @@ -437,10 +437,15 @@ 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) - bootImageFilesByArch := buildBootImage(ctx, imageConfig, profile) - // Zip the boot image files up. - buildBootImageZipInPredefinedLocation(ctx, imageConfig, bootImageFilesByArch) + // Build boot image files for the android variants. + androidBootImageFilesByArch := buildBootImageVariantsForAndroidOs(ctx, imageConfig, profile) + + // Zip the android variant boot image files up. + buildBootImageZipInPredefinedLocation(ctx, imageConfig, androidBootImageFilesByArch) + + // Build boot image files for the host variants. There are use directly by ART host side tests. + buildBootImageVariantsForBuildOs(ctx, imageConfig, profile) dumpOatRules(ctx, imageConfig) } -- cgit v1.2.3-59-g8ed1b