'vendor_available: *' will not create product variant
With this patch, `vendor_available: true` will no longer creates
product variant. Instead, modules need to set `product_available:
true` if they have to be available to product vanriant.
If both properties are defined for VNDKs, they must have the same
values.
Bug: 150902910
Test: m nothing
Change-Id: I28fb6886e6114583227a31151136627c8516ac9c
diff --git a/cc/cc.go b/cc/cc.go
index a023f3f..26250a7 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -360,7 +360,11 @@
//
// If set to false, this module becomes inaccessible from /vendor modules.
//
- // Default value is true when vndk: {enabled: true} or vendor: true.
+ // The modules with vndk: {enabled: true} must define 'vendor_available'
+ // to either 'true' or 'false'. In this case, 'vendor_available: false' has
+ // a different meaning than that of non-VNDK modules.
+ // 'vendor_available: false' for a VNDK module means 'VNDK-private' that
+ // can only be depended on by VNDK libraries, not by non-VNDK vendor modules.
//
// Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
Vendor_available *bool
@@ -376,7 +380,19 @@
// make assumptions about the system that may not be true in the
// future.
//
- // It must be set to true by default for vndk: {enabled: true} modules.
+ // If set to false, this module becomes inaccessible from /product modules.
+ //
+ // Different from the 'vendor_available' property, the modules with
+ // vndk: {enabled: true} don't have to define 'product_available'. The VNDK
+ // library without 'product_available' may not be depended on by any other
+ // modules that has product variants including the product available VNDKs.
+ // However, for the modules with vndk: {enabled: true},
+ // 'product_available: false' creates the product variant that is available
+ // only for the other product available VNDK modules but not by non-VNDK
+ // product modules.
+ // In the case of the modules with vndk: {enabled: true}, if
+ // 'product_available' is defined, it must have the same value with the
+ // 'vendor_available'.
//
// Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
// and PRODUCT_PRODUCT_VNDK_VERSION isn't set.