Fix dangling rules on aosp_cf_x86_phone
aosp_cf_x86_phone uses SecondArchIsTranslated, which was leaving a dangling rule from the oatdump rules to out/soong/vsoc_x86/dex_bootjars/system/framework/arm/boot.art. Consolidate the code to select targets for dexpreopting and use it in more places to prevent references to boot images that were not generated. Test: m checkbuild Change-Id: Ia4945a99ff5e575e759299106559c85f38489acc
This commit is contained in:
@@ -56,6 +56,7 @@ type bootImageConfig struct {
|
||||
dexPaths android.WritablePaths
|
||||
dir android.OutputPath
|
||||
symbolsDir android.OutputPath
|
||||
targets []android.Target
|
||||
images map[android.ArchType]android.OutputPath
|
||||
zip android.WritablePath
|
||||
}
|
||||
@@ -191,16 +192,9 @@ func buildBootImage(ctx android.SingletonContext, config bootImageConfig) *bootI
|
||||
var allFiles android.Paths
|
||||
|
||||
if !global.DisablePreopt {
|
||||
targets := ctx.Config().Targets[android.Android]
|
||||
if ctx.Config().SecondArchIsTranslated() {
|
||||
targets = targets[:1]
|
||||
}
|
||||
|
||||
for _, target := range targets {
|
||||
if target.NativeBridge == android.NativeBridgeDisabled {
|
||||
files := buildBootImageRuleForArch(ctx, image, target.Arch.ArchType, profile, missingDeps)
|
||||
allFiles = append(allFiles, files.Paths()...)
|
||||
}
|
||||
for _, target := range image.targets {
|
||||
files := buildBootImageRuleForArch(ctx, image, target.Arch.ArchType, profile, missingDeps)
|
||||
allFiles = append(allFiles, files.Paths()...)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user