Make filegroup paths relative to module dir in mixed builds

filegroup.srcs must have a .rel() version of their paths
that is relative to the module directory. Previously in
mixed builds, the relative path wasn't filled in.

Bug: 229251008
Bug: 204244290
Test: go tests, and USE_BAZEL_ANALYSIS=1 m apexer with the following cl
Change-Id: I11a2a8b96139e0e7b956fa4c256a9a99c02f88f3
This commit is contained in:
Cole Faust
2022-06-03 16:00:11 -07:00
parent d848f28449
commit 9a06d25be2
4 changed files with 145 additions and 11 deletions

View File

@@ -178,8 +178,7 @@ func (fg *fileGroup) ProcessBazelQueryResponse(ctx ModuleContext) {
bazelOuts := make(Paths, 0, len(filePaths))
for _, p := range filePaths {
src := PathForBazelOut(ctx, p)
bazelOuts = append(bazelOuts, src)
bazelOuts = append(bazelOuts, PathForBazelOutRelative(ctx, ctx.ModuleDir(), p))
}
fg.srcs = bazelOuts