Add tests for request_type ParseResult functions.
Test: go test request_type_test
Test: bp2build generate & sync; mixed build libc
Change-Id: Id0b813e9de4d02d8625e42549999659ccb005c6d
diff --git a/cc/library.go b/cc/library.go
index cb0aebf..53be3a5 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -483,12 +483,16 @@
func (handler *staticLibraryBazelHandler) generateBazelBuildActions(ctx android.ModuleContext, label string) bool {
bazelCtx := ctx.Config().BazelContext
- ccInfo, ok := bazelCtx.GetCcInfo(label, ctx.Arch().ArchType)
- outputPaths := ccInfo.OutputFiles
- objPaths := ccInfo.CcObjectFiles
+ ccInfo, ok, err := bazelCtx.GetCcInfo(label, ctx.Arch().ArchType)
+ if err != nil {
+ ctx.ModuleErrorf("Error getting Bazel CcInfo: %s", err)
+ return false
+ }
if !ok {
return ok
}
+ outputPaths := ccInfo.OutputFiles
+ objPaths := ccInfo.CcObjectFiles
if len(outputPaths) > 1 {
// TODO(cparsons): This is actually expected behavior for static libraries with no srcs.
// We should support this.