summaryrefslogtreecommitdiff
path: root/java/bootclasspath.go
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2023-07-13 11:03:38 +0100
committer Jiakai Zhang <jiakaiz@google.com> 2023-07-14 12:13:28 +0100
commitcb13b5d1bde9a45316271c61fd23a22c35ebf609 (patch)
tree106fae4f1411b188d820c7fea564f43a45067e5c /java/bootclasspath.go
parente3c11d0aad4e1efa17e6dbade960f6041ecd602d (diff)
Refactor dexpreopt for boot jars to make it flexible to config changes.
In the past, dexpreopt for boot jars was very inflexible, and it was incredibly hard to make a change that is as simple as adding a jar to a boot image. Boot image generation was handled by "platform_bootclasspath" and "bootclasspath_fragment" separately. This caused not only code duplication but also the inflexiblity as such a design did not fit today's use cases, where a boot image may take jars from multiple mainline modules and the platform, and a mainline module can contribute to multiple boot images. The design casued a huge maintenance burden as any change to the boot image cost multi-week efforts. In recent years, efforts have been made to improve this a bit by a bit. This change is another step towards making dexpreopt reasonable. After this change, all boot images are generated by "dex_bootjars", which is in build/soong and is therefore available on both the full source tree and the thin manifest (master-art). The change decouples profile generation/extraction from boot image generation. Profiles for mainline modules are still handled by "bootclasspath_fragment" because they need to be packed into APEXes when building mainline modules and extracted from APEXes whem building the system image from prebuilt modules. Boot images are not handled by "bootclasspath_fragment" anymore. Bug: 290583827 Test: m (all existing tests are still passing) Test: Manually checked that the boot images are exactly the same as before. Change-Id: Ib5a5f401bee334ffcab5c26618e0c8888b84575a
Diffstat (limited to 'java/bootclasspath.go')
-rw-r--r--java/bootclasspath.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/java/bootclasspath.go b/java/bootclasspath.go
index 29eed795d..c7dc3afae 100644
--- a/java/bootclasspath.go
+++ b/java/bootclasspath.go
@@ -185,6 +185,9 @@ var _ android.ExcludeFromVisibilityEnforcementTag = bootclasspathDependencyTag{}
// The tag used for dependencies onto bootclasspath_fragments.
var bootclasspathFragmentDepTag = bootclasspathDependencyTag{name: "fragment"}
+// The tag used for dependencies onto platform_bootclasspath.
+var platformBootclasspathDepTag = bootclasspathDependencyTag{name: "platform"}
+
// BootclasspathNestedAPIProperties defines properties related to the API provided by parts of the
// bootclasspath that are nested within the main BootclasspathAPIProperties.
type BootclasspathNestedAPIProperties struct {