mixed builds: Make apex's GetBazelLabel return the label of the override_apex, if applicable.

And add test1_com.android.tzdata to prod allowlist.

Fixes: 261054570
Bug: 261054570
Test: mkcompare
Change-Id: I314a4e44ade958ba9a91f71430d76175d734579e
This commit is contained in:
Jingwen Chen
2022-12-16 08:16:01 +00:00
parent 597894279d
commit 889f2f2844
6 changed files with 308 additions and 101 deletions

View File

@@ -1875,6 +1875,17 @@ func (a *apexBundle) QueueBazelCall(ctx android.BaseModuleContext) {
bazelCtx.QueueBazelRequest(a.GetBazelLabel(ctx, a), cquery.GetApexInfo, android.GetConfigKey(ctx))
}
// GetBazelLabel returns the bazel label of this apexBundle, or the label of the
// override_apex module overriding this apexBundle. An apexBundle can be
// overridden by different override_apex modules (e.g. Google or Go variants),
// which is handled by the overrides mutators.
func (a *apexBundle) GetBazelLabel(ctx android.BazelConversionPathContext, module blueprint.Module) string {
if _, ok := ctx.Module().(android.OverridableModule); ok {
return android.MaybeBp2buildLabelOfOverridingModule(ctx)
}
return a.BazelModuleBase.GetBazelLabel(ctx, a)
}
func (a *apexBundle) ProcessBazelQueryResponse(ctx android.ModuleContext) {
if !a.commonBuildActions(ctx) {
return