Correct allowlisting for override modules

Prevoiusly, we were partially correcting for override modules in
bp2build/mixed builds in some but not all places. Now we always check
for override modules and ensure that Bazel_module properties are
propagated properly for override modules.

Bug: 279609939
Test: go test soong tests
Change-Id: I5445aa71f4c8013315415a2ca9ab9c6b3be6bce0
This commit is contained in:
Liz Kammer
2023-05-01 13:46:33 -04:00
parent 12d170dc2a
commit 20f0f780df
5 changed files with 209 additions and 125 deletions

View File

@@ -453,8 +453,8 @@ func samePackage(label1, label2 string) bool {
}
func bp2buildModuleLabel(ctx BazelConversionContext, module blueprint.Module) string {
moduleName := ctx.OtherModuleName(module)
moduleDir := ctx.OtherModuleDir(module)
moduleName := moduleNameWithPossibleOverride(ctx, module)
moduleDir := moduleDirWithPossibleOverride(ctx, module)
if moduleDir == Bp2BuildTopLevel {
moduleDir = ""
}