Define odm_available property to install a vendor variant to odm
'vendor_available: true' creates a vendor variant from a system
module. The vendor variant of the module is installed to /vendor.
However, we may want to install the vendor variant to /odm, instead.
'device_specific: true' does not work for this purpose because
'vendor_available: true' is allowed only for the system or product
modules to create a vendor variant. But 'device_specific: true'
itself creates a vendor variant that may not work with
'vendor_available: true'.
To install the vendor variant to /odm, we define a new property
'odm_available'. 'odm_available' is exactly the same as the
'vendor_available' except the install path of the vendor variant.
By defining 'odm_available: true', the vendor variant of the module
will be installed to /odm or /vendor/odm instead of /vendor.
Bug: 176147321
Bug: 176079978
Test: check if a module with 'odm_available: true' is installed to
/vendor/odm
Change-Id: I2d16bd2c515796597b2fbd1eb66f7c2736434697
diff --git a/cc/cc.go b/cc/cc.go
index 8755efe..afa6bf9 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -390,6 +390,17 @@
// Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
Vendor_available *bool
+ // This is the same as the "vendor_available" except that the install path
+ // of the vendor variant is /odm or /vendor/odm.
+ // By replacing "vendor_available: true" with "odm_available: true", the
+ // module will install its vendor variant to the /odm partition or /vendor/odm.
+ // As the modules with "odm_available: true" still create the vendor variants,
+ // they can link to the other vendor modules as the vendor_available modules do.
+ // Also, the vendor modules can link to odm_available modules.
+ //
+ // It may not be used for VNDK modules.
+ Odm_available *bool
+
// whether this module should be allowed to be directly depended by other
// modules with `product_specific: true` or `product_available: true`.
// If set to true, an additional product variant will be built separately