Google官网解释:https://source.android.com/setup/add-device
When building for a particular product, it's often useful to have minor variations on what is ultimately the final release build. In a module definition, the module can specify tags with LOCAL_MODULE_TAGS
, which can be one or more values of optional
(default), debug
, eng
.
If a module doesn't specify a tag (by LOCAL_MODULE_TAGS
), its tag defaults to optional
. An optional module is installed only if it is required by product configuration with PRODUCT_PACKAGES
.
个人理解大体含义应该是如果你的模块使用LOCAL_MODULE_TAGS=optional,则只有将你的模块添加进PRODUCT_PACKAGES时它才会自动编译当你执行整个AOSP make的时候