Merge "dexpreopt rules for google mainline prebuilts with missing source" into main

This commit is contained in:
Treehugger Robot
2024-08-28 01:25:52 +00:00
committed by Gerrit Code Review
2 changed files with 107 additions and 0 deletions

View File

@@ -558,6 +558,10 @@ func addDependenciesOntoSelectedBootImageApexes(ctx android.BottomUpMutatorConte
apexVariationOfSelected := append(ctx.Target().Variations(), blueprint.Variation{Mutator: "apex", Variation: apex})
if ctx.OtherModuleDependencyVariantExists(apexVariationOfSelected, selected) {
ctx.AddFarVariationDependencies(apexVariationOfSelected, dexpreoptBootJarDepTag, selected)
} else if ctx.OtherModuleDependencyVariantExists(apexVariationOfSelected, android.RemoveOptionalPrebuiltPrefix(selected)) {
// The prebuilt might have been renamed by prebuilt_rename mutator if the source module does not exist.
// Remove the prebuilt_ prefix.
ctx.AddFarVariationDependencies(apexVariationOfSelected, dexpreoptBootJarDepTag, android.RemoveOptionalPrebuiltPrefix(selected))
}
}
}