Consolidate cc-specific cqueries.

There is little overlap at this point, but we expect these to converge
more over time, to handle exported includes, libs, etc., this will allow
those changes to be handled in one place and allow more consolidation of
code.

Test: bp2build generate & sync; mixed build libc
Change-Id: I51685dad9f4fc11a634965a3c9e84f4a0e279ecb
This commit is contained in:
Liz Kammer
2021-04-09 14:07:00 -04:00
parent 8d62a4f725
commit b71794d8e6
4 changed files with 45 additions and 82 deletions

View File

@@ -483,7 +483,9 @@ type staticLibraryBazelHandler struct {
func (handler *staticLibraryBazelHandler) generateBazelBuildActions(ctx android.ModuleContext, label string) bool {
bazelCtx := ctx.Config().BazelContext
outputPaths, objPaths, ok := bazelCtx.GetOutputFilesAndCcObjectFiles(label, ctx.Arch().ArchType)
ccInfo, ok := bazelCtx.GetCcInfo(label, ctx.Arch().ArchType)
outputPaths := ccInfo.OutputFiles
objPaths := ccInfo.CcObjectFiles
if !ok {
return ok
}

View File

@@ -329,7 +329,8 @@ type prebuiltStaticLibraryBazelHandler struct {
func (h *prebuiltStaticLibraryBazelHandler) generateBazelBuildActions(ctx android.ModuleContext, label string) bool {
bazelCtx := ctx.Config().BazelContext
staticLibs, ok := bazelCtx.GetPrebuiltCcStaticLibraryFiles(label, ctx.Arch().ArchType)
ccInfo, ok := bazelCtx.GetCcInfo(label, ctx.Arch().ArchType)
staticLibs := ccInfo.CcStaticLibraryFiles
if !ok {
return false
}