Add and use staticLibrary()
Add staticLibrary() that returns true for a static variant of a
library, and replace all instances of foo.static() && !foo.staticBinary()
with foo.staticLibrary.
Test: builds
Change-Id: I0bf0c18669c24f23ebc9cc33d525b86d81e22d40
diff --git a/cc/coverage.go b/cc/coverage.go
index a7618dd..dbb424f 100644
--- a/cc/coverage.go
+++ b/cc/coverage.go
@@ -145,7 +145,7 @@
// Even if we don't have coverage enabled, if any of our object files were compiled
// with coverage, then we need to add --coverage to our ldflags.
if !cov.linkCoverage {
- if ctx.static() && !ctx.staticBinary() {
+ if ctx.staticLibrary() {
// For static libraries, the only thing that changes our object files
// are included whole static libraries, so check to see if any of
// those have coverage enabled.