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/library.go b/cc/library.go
index ea87946..6485ea3 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -1800,12 +1800,17 @@
return library.shared() || library.static()
}
-// static returns true if this library is for a "static' variant.
+// static returns true if this library is for a "static" variant.
func (library *libraryDecorator) static() bool {
return library.MutatedProperties.VariantIsStatic
}
-// shared returns true if this library is for a "shared' variant.
+// staticLibrary returns true if this library is for a "static"" variant.
+func (library *libraryDecorator) staticLibrary() bool {
+ return library.static()
+}
+
+// shared returns true if this library is for a "shared" variant.
func (library *libraryDecorator) shared() bool {
return library.MutatedProperties.VariantIsShared
}