cc: Add docstring for IsVndk() and UseVndk()
Note that IsVndk() returns true for all variants of vndk-enabled
libraries. Not only vendor variant, but also platform and product
variants of vndk-enabled library return true.
OTOH, `UseVndk() && IsVndk()` returns true for vendor and product
variants of vndk-enabled libraries, which actually include the actual
VNDK libs (which goes into the VNDK apex) and VNDK extension libs (which
goes to /product or /vendor partition).
Bug: 259361996
Test: Presubmit
Change-Id: Ib735fe0f7433284ca768d0e251a4f599fff5185c
diff --git a/cc/cc.go b/cc/cc.go
index 306e483..9035e35 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1205,6 +1205,8 @@
return c
}
+// UseVndk() returns true if this module is built against VNDK.
+// This means the vendor and product variants of a module.
func (c *Module) UseVndk() bool {
return c.Properties.VndkVersion != ""
}
@@ -1298,6 +1300,9 @@
return false
}
+// IsVndk() returns true if this module has a vndk variant.
+// Note that IsVndk() returns true for all variants of vndk-enabled libraries. Not only vendor variant,
+// but also platform and product variants of vndk-enabled libraries return true for IsVndk().
func (c *Module) IsVndk() bool {
if vndkdep := c.vndkdep; vndkdep != nil {
return vndkdep.isVndk()