From 4d2eeed0dad64b14c9fd8641ff304ac40cd17fe6 Mon Sep 17 00:00:00 2001 From: Ulya Trafimovich Date: Fri, 8 Nov 2019 10:54:21 +0000 Subject: Use boot image extension for framework libraries. This patch splits the system boot image in two parts: - The ART boot image. This is the primary boot image that is included in the ART apex and contains dexpreopted Core Libraries. - The framweork boot image extension. It depends on the ART boot image and contains framework libraries. The third "apex" boot image (used in the JIT-zygote experiment) remains unchanged; it is a monolithic primary boot image that contains both libcore and framework libraries. Dexpreopting of APKs now uses the framework boot image extension (which in turn pulls in the ART boot image as a dependency). Test: m Test: phone boots: lunch aosp_walleye-userdebug && m \ && adb reboot bootloader && fastboot flashall -w Bug: b/119800099 Exempt-From-Owner-Approval: rebased after getting approval. Change-Id: Ida40dfae8c83bf7c2e737d5c7ea418e1197ad826 --- java/dexpreopt.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'java/dexpreopt.go') diff --git a/java/dexpreopt.go b/java/dexpreopt.go index 2b1c9941e..479dec60b 100644 --- a/java/dexpreopt.go +++ b/java/dexpreopt.go @@ -124,7 +124,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo } var images android.Paths - var imagesDeps []android.Paths + var imagesDeps []android.OutputPaths for _, arch := range archs { images = append(images, bootImage.images[arch]) imagesDeps = append(imagesDeps, bootImage.imagesDeps[arch]) @@ -169,15 +169,16 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo UsesLibraries: d.usesLibs, LibraryPaths: d.libraryPaths, - Archs: archs, - DexPreoptImages: images, - DexPreoptImagesDeps: imagesDeps, + Archs: archs, + DexPreoptImages: images, + DexPreoptImagesDeps: imagesDeps, + DexPreoptImageLocations: bootImage.imageLocations, // We use the dex paths and dex locations of the default boot image, as it // contains the full dexpreopt boot classpath. Other images may just contain a subset of // the dexpreopt boot classpath. - PreoptBootClassPathDexFiles: defaultBootImage.dexPaths.Paths(), - PreoptBootClassPathDexLocations: defaultBootImage.dexLocations, + PreoptBootClassPathDexFiles: defaultBootImage.dexPathsDeps.Paths(), + PreoptBootClassPathDexLocations: defaultBootImage.dexLocationsDeps, PreoptExtractedApk: false, -- cgit v1.2.3-59-g8ed1b