Distinguish boot images by target rather than arch
We plan to add boot image variants for host tests.
Distinguishing the variants by arch does not work,
since both host and device can have the same arch.
(cherry picked from commit c177ebeca9
)
Test: m
Bug: 152037801
Merged-In: Iea73c77367affb074f97a0fc318389417ce537da
Change-Id: I8b95882bb00cd2fd1f6cfd8a2784f9ebb957eec6
This commit is contained in:
committed by
Vladimir Marko
parent
39ea894335
commit
163bda65fd
@@ -139,8 +139,6 @@ func genBootImageConfigs(ctx android.PathContext) map[string]*bootImageConfig {
|
||||
|
||||
// common to all configs
|
||||
for _, c := range configs {
|
||||
c.targets = targets
|
||||
|
||||
c.dir = deviceDir.Join(ctx, "dex_"+c.name+"jars")
|
||||
c.symbolsDir = deviceDir.Join(ctx, "dex_"+c.name+"jars_unstripped")
|
||||
|
||||
@@ -159,14 +157,17 @@ func genBootImageConfigs(ctx android.PathContext) map[string]*bootImageConfig {
|
||||
}
|
||||
c.dexPathsDeps = c.dexPaths
|
||||
|
||||
c.images = make(map[android.ArchType]android.OutputPath)
|
||||
c.imagesDeps = make(map[android.ArchType]android.OutputPaths)
|
||||
|
||||
// Create target-specific variants.
|
||||
for _, target := range targets {
|
||||
arch := target.Arch.ArchType
|
||||
imageDir := c.dir.Join(ctx, c.installSubdir, arch.String())
|
||||
c.images[arch] = imageDir.Join(ctx, imageName)
|
||||
c.imagesDeps[arch] = c.moduleFiles(ctx, imageDir, ".art", ".oat", ".vdex")
|
||||
variant := &bootImageVariant{
|
||||
bootImageConfig: c,
|
||||
target: target,
|
||||
images: imageDir.Join(ctx, imageName),
|
||||
imagesDeps: c.moduleFiles(ctx, imageDir, ".art", ".oat", ".vdex"),
|
||||
}
|
||||
c.variants = append(c.variants, variant)
|
||||
}
|
||||
|
||||
c.zip = c.dir.Join(ctx, c.name+".zip")
|
||||
@@ -174,19 +175,21 @@ func genBootImageConfigs(ctx android.PathContext) map[string]*bootImageConfig {
|
||||
|
||||
// specific to the framework config
|
||||
frameworkCfg.dexPathsDeps = append(artCfg.dexPathsDeps, frameworkCfg.dexPathsDeps...)
|
||||
frameworkCfg.primaryImages = artCfg.images
|
||||
for i := range targets {
|
||||
frameworkCfg.variants[i].primaryImages = artCfg.variants[i].images
|
||||
}
|
||||
frameworkCfg.imageLocations = append(artCfg.imageLocations, frameworkCfg.imageLocations...)
|
||||
|
||||
return configs
|
||||
}).(map[string]*bootImageConfig)
|
||||
}
|
||||
|
||||
func artBootImageConfig(ctx android.PathContext) bootImageConfig {
|
||||
return *genBootImageConfigs(ctx)[artBootImageName]
|
||||
func artBootImageConfig(ctx android.PathContext) *bootImageConfig {
|
||||
return genBootImageConfigs(ctx)[artBootImageName]
|
||||
}
|
||||
|
||||
func defaultBootImageConfig(ctx android.PathContext) bootImageConfig {
|
||||
return *genBootImageConfigs(ctx)[frameworkBootImageName]
|
||||
func defaultBootImageConfig(ctx android.PathContext) *bootImageConfig {
|
||||
return genBootImageConfigs(ctx)[frameworkBootImageName]
|
||||
}
|
||||
|
||||
func defaultBootclasspath(ctx android.PathContext) []string {
|
||||
|
Reference in New Issue
Block a user