diff options
author | 2023-02-20 16:30:01 +0000 | |
---|---|---|
committer | 2023-02-24 17:14:08 +0000 | |
commit | 3830308fb8be13df66437b9798122789c85c7e37 (patch) | |
tree | 28ac3371a82fb36bbea433789c73b29b6b75248d /java/dexpreopt_config.go | |
parent | d49324dadb1fc38c363c0bc7ab28afacdf71b742 (diff) |
Generate a boot image extension for mainline BCP jars.
Bug: 269230245
Test: m
Test: atest art_standalone_dexpreopt_tests
Change-Id: I253c30d938eee2cf2549ec2338425d53956e7cbb
Diffstat (limited to 'java/dexpreopt_config.go')
-rw-r--r-- | java/dexpreopt_config.go | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go index 76c78cb29..117b660b7 100644 --- a/java/dexpreopt_config.go +++ b/java/dexpreopt_config.go @@ -44,6 +44,8 @@ var ( bootImageConfigRawKey = android.NewOnceKey("bootImageConfigRaw") artBootImageName = "art" frameworkBootImageName = "boot" + mainlineBootImageName = "mainline" + bootImageStem = "boot" ) func genBootImageConfigRaw(ctx android.PathContext) map[string]*bootImageConfig { @@ -52,14 +54,16 @@ func genBootImageConfigRaw(ctx android.PathContext) map[string]*bootImageConfig artModules := global.ArtApexJars frameworkModules := global.BootJars.RemoveList(artModules) + mainlineBcpModules := global.ApexBootJars + frameworkSubdir := "system/framework" // ART config for the primary boot image in the ART apex. // It includes the Core Libraries. artCfg := bootImageConfig{ name: artBootImageName, - stem: "boot", + stem: bootImageStem, installDirOnHost: "apex/art_boot_images/javalib", - installDirOnDevice: "system/framework", + installDirOnDevice: frameworkSubdir, profileInstallPathInApex: "etc/boot-image.prof", modules: artModules, preloadedClassesFile: "art/build/boot/preloaded-classes", @@ -68,11 +72,10 @@ func genBootImageConfigRaw(ctx android.PathContext) map[string]*bootImageConfig // Framework config for the boot image extension. // It includes framework libraries and depends on the ART config. - frameworkSubdir := "system/framework" frameworkCfg := bootImageConfig{ extends: &artCfg, name: frameworkBootImageName, - stem: "boot", + stem: bootImageStem, installDirOnHost: frameworkSubdir, installDirOnDevice: frameworkSubdir, modules: frameworkModules, @@ -80,9 +83,20 @@ func genBootImageConfigRaw(ctx android.PathContext) map[string]*bootImageConfig compilerFilter: "speed-profile", } + mainlineCfg := bootImageConfig{ + extends: &frameworkCfg, + name: mainlineBootImageName, + stem: bootImageStem, + installDirOnHost: frameworkSubdir, + installDirOnDevice: frameworkSubdir, + modules: mainlineBcpModules, + compilerFilter: "verify", + } + return map[string]*bootImageConfig{ artBootImageName: &artCfg, frameworkBootImageName: &frameworkCfg, + mainlineBootImageName: &mainlineCfg, } }).(map[string]*bootImageConfig) } @@ -174,6 +188,10 @@ func defaultBootImageConfig(ctx android.PathContext) *bootImageConfig { return genBootImageConfigs(ctx)[frameworkBootImageName] } +func mainlineBootImageConfig(ctx android.PathContext) *bootImageConfig { + return genBootImageConfigs(ctx)[mainlineBootImageName] +} + // Apex boot config allows to access build/install paths of apex boot jars without going // through the usual trouble of registering dependencies on those modules and extracting build paths // from those dependencies. |