Merge "Revert^2 "Use boot image extension for framework libraries.""

This commit is contained in:
Ulyana Trafimovich 2020-01-09 13:20:36 +00:00 committed by Gerrit Code Review
commit a773c39bfc
2 changed files with 16 additions and 11 deletions

View file

@ -48,7 +48,7 @@ func TestDexpreoptBootJars(t *testing.T) {
pathCtx := android.PathContextForTesting(config)
dexpreoptConfig := dexpreopt.GlobalConfigForTests(pathCtx)
dexpreoptConfig.ArtApexJars = []string{"foo", "bar", "baz"}
dexpreoptConfig.BootJars = []string{"foo", "bar", "baz"}
setDexpreoptTestGlobalConfig(config, dexpreoptConfig)
ctx := testContext()
@ -59,9 +59,10 @@ func TestDexpreoptBootJars(t *testing.T) {
dexpreoptBootJars := ctx.SingletonForTests("dex_bootjars")
bootArt := dexpreoptBootJars.Output("boot.art")
bootArt := dexpreoptBootJars.Output("boot-foo.art")
expectedInputs := []string{
"dex_artjars/apex/com.android.art/javalib/arm64/boot.art",
"dex_bootjars_input/foo.jar",
"dex_bootjars_input/bar.jar",
"dex_bootjars_input/baz.jar",
@ -82,19 +83,19 @@ func TestDexpreoptBootJars(t *testing.T) {
expectedOutputs := []string{
"dex_bootjars/system/framework/arm64/boot.invocation",
"dex_bootjars/system/framework/arm64/boot.art",
"dex_bootjars/system/framework/arm64/boot-foo.art",
"dex_bootjars/system/framework/arm64/boot-bar.art",
"dex_bootjars/system/framework/arm64/boot-baz.art",
"dex_bootjars/system/framework/arm64/boot.oat",
"dex_bootjars/system/framework/arm64/boot-foo.oat",
"dex_bootjars/system/framework/arm64/boot-bar.oat",
"dex_bootjars/system/framework/arm64/boot-baz.oat",
"dex_bootjars/system/framework/arm64/boot.vdex",
"dex_bootjars/system/framework/arm64/boot-foo.vdex",
"dex_bootjars/system/framework/arm64/boot-bar.vdex",
"dex_bootjars/system/framework/arm64/boot-baz.vdex",
"dex_bootjars_unstripped/system/framework/arm64/boot.oat",
"dex_bootjars_unstripped/system/framework/arm64/boot-foo.oat",
"dex_bootjars_unstripped/system/framework/arm64/boot-bar.oat",
"dex_bootjars_unstripped/system/framework/arm64/boot-baz.oat",
}

View file

@ -167,15 +167,15 @@ func genBootImageConfigs(ctx android.PathContext) map[string]*bootImageConfig {
}
// Framework config for the boot image extension.
// It includes both the Core libraries and framework.
// It includes framework libraries and depends on the ART config.
frameworkCfg := bootImageConfig{
extension: false,
extension: true,
name: frameworkBootImageName,
stem: "boot",
installSubdir: frameworkSubdir,
modules: concat(artModules, frameworkModules),
dexLocations: concat(artLocations, frameworkLocations),
dexLocationsDeps: concat(artLocations, frameworkLocations),
modules: frameworkModules,
dexLocations: frameworkLocations,
dexLocationsDeps: append(artLocations, frameworkLocations...),
}
// Apex config for the boot image used in the JIT-zygote experiment.
@ -231,6 +231,10 @@ func genBootImageConfigs(ctx android.PathContext) map[string]*bootImageConfig {
c.zip = c.dir.Join(ctx, c.name+".zip")
}
// specific to the framework config
frameworkCfg.dexPathsDeps = append(artCfg.dexPathsDeps, frameworkCfg.dexPathsDeps...)
frameworkCfg.imageLocations = append(artCfg.imageLocations, frameworkCfg.imageLocations...)
return configs
}).(map[string]*bootImageConfig)
}