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

@@ -455,6 +455,9 @@ func samePackage(label1, label2 string) bool {
func bp2buildModuleLabel(ctx BazelConversionContext, module blueprint.Module) string {
moduleName := ctx.OtherModuleName(module)
moduleDir := ctx.OtherModuleDir(module)
if moduleDir == Bp2BuildTopLevel {
moduleDir = ""
}
return fmt.Sprintf("//%s:%s", moduleDir, moduleName)
}