Merge "Share vdex files in the ART apex between architectures (via symlinks)."
This commit is contained in:
@@ -186,19 +186,31 @@ type dexpreoptBootJars struct {
|
||||
}
|
||||
|
||||
// Accessor function for the apex package. Returns nil if dexpreopt is disabled.
|
||||
func DexpreoptedArtApexJars(ctx android.BuilderContext) map[android.ArchType]android.OutputPaths {
|
||||
func DexpreoptedArtApexJars(ctx android.BuilderContext) (map[android.ArchType]android.OutputPaths, android.OutputPaths) {
|
||||
if skipDexpreoptBootJars(ctx) {
|
||||
return nil
|
||||
return nil, nil
|
||||
}
|
||||
// Include dexpreopt files for the primary boot image.
|
||||
files := map[android.ArchType]android.OutputPaths{}
|
||||
for _, variant := range artBootImageConfig(ctx).variants {
|
||||
|
||||
image := artBootImageConfig(ctx)
|
||||
|
||||
// Target-independent boot image files (*.vdex).
|
||||
anyTarget := image.variants[0].target
|
||||
vdexDir := image.dir.Join(ctx, anyTarget.Os.String(), image.installSubdir, anyTarget.Arch.ArchType.String())
|
||||
vdexFiles := image.moduleFiles(ctx, vdexDir, ".vdex")
|
||||
|
||||
// Target-specific boot image files (*.oat, *.art).
|
||||
artAndOatFiles := map[android.ArchType]android.OutputPaths{}
|
||||
for _, variant := range image.variants {
|
||||
// We also generate boot images for host (for testing), but we don't need those in the apex.
|
||||
if variant.target.Os == android.Android {
|
||||
files[variant.target.Arch.ArchType] = variant.imagesDeps
|
||||
os := variant.target.Os
|
||||
if os == android.Android {
|
||||
arch := variant.target.Arch.ArchType
|
||||
archDir := image.dir.Join(ctx, os.String(), image.installSubdir, arch.String())
|
||||
artAndOatFiles[arch] = image.moduleFiles(ctx, archDir, ".art", ".oat")
|
||||
}
|
||||
}
|
||||
return files
|
||||
|
||||
return artAndOatFiles, vdexFiles
|
||||
}
|
||||
|
||||
// dexpreoptBoot singleton rules
|
||||
|
Reference in New Issue
Block a user