summaryrefslogtreecommitdiff
path: root/java/platform_bootclasspath.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-07-02 13:00:43 +0100
committerPaul Duffin <paulduffin@google.com>2021-07-06 22:20:24 +0100
commit6e89b547809f70ea474162f8e3b0e57dd80320df (patch)
treee220efbad93989ef0720ac58ce72498b89941e1d /java/platform_bootclasspath.go
parentd564c3281892d6083c1d8f4764ede9a87344536b (diff)
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 Merged-In: I6af00f19bb71aa18dd462f5eac6aa38e3e721023 Change-Id: I6af00f19bb71aa18dd462f5eac6aa38e3e721023 (cherry picked from commit a56be7d7815ad164cdd854f8fc6b1cbc3bbf1918)
Diffstat (limited to 'java/platform_bootclasspath.go')
-rw-r--r--java/platform_bootclasspath.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/java/platform_bootclasspath.go b/java/platform_bootclasspath.go
index cb92922fa..10739b015 100644
--- a/java/platform_bootclasspath.go
+++ b/java/platform_bootclasspath.go
@@ -421,10 +421,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)
}