Do not read 'vendor_available: false'
In case of VNDK, 'vendor_available: false' had a special meaning that
defines VNDK-private libraries. It is not trivial because not
defining a boolean property means 'false' normally. To avoid the
confusion replace it with the 'vndk.private: true' for VNDK-private
libraries and 'private: true' for LLNDK-private libraries.
All VNDK libraries must define 'vendor_available: true' and may have
'vndk.private: true' if they are VNDK-private.
With this change '(vendor|product)_available: false' is the same as
not defining the property.
LLNDK-private must define 'private: true' instead of
'vendor_available: false'.
Bug: 175768895
Test: build
Change-Id: I57fbca351be317257d95027f3cdcdbbe537eab23
diff --git a/cc/vndk.go b/cc/vndk.go
index 2071a03..cb29d12 100644
--- a/cc/vndk.go
+++ b/cc/vndk.go
@@ -302,7 +302,7 @@
llndkLibraries(mctx.Config())[name] = filename
m.VendorProperties.IsLLNDK = true
- if !Bool(lib.Properties.Vendor_available) {
+ if Bool(lib.Properties.Private) {
vndkPrivateLibraries(mctx.Config())[name] = filename
m.VendorProperties.IsLLNDKPrivate = true
}
@@ -349,7 +349,7 @@
if m.IsVndkPrivate() {
vndkPrivateLibraries(mctx.Config())[name] = filename
}
- if m.VendorProperties.Product_available != nil {
+ if Bool(m.VendorProperties.Product_available) {
vndkProductLibraries(mctx.Config())[name] = filename
}
}