LOCAL_MODULE_TAGS的这几个选项意思

本文解析了Android构建系统中模块标签的含义及其对不同构建类型的影响,包括'user'、'eng'、'tests'和'optional'等,并解释了这些标签如何控制模块在不同版本中的编译。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

"Set LOCAL_MODULE_TAGS to any number of whitespace-separated tags.

This variable controls what build flavors the package gets included
in. For example:

* user: include this in user/userdebug builds
* eng: include this in eng builds
* tests: the target is a testing target and makes it available for
tests
* optional: don't include this"

Are these the same as "variants" and if so, which name would affect
the build and how? I've noticed that everything mentioned in a
product's makefile will always get built. But what gets in the final
system.img not always the same as what gets built.
以下为可能性最大的答案:
就是mk的标记啊,

直接给你上官方的吧

http://android.git.kernel.org/?p=platform/build.git;a=blob_plain;f=core/build-system.html;h=43bae03b6b7b9cba678b86d2faf424fa565497bf;hb=HEAD
user:指该模块只在user版本下才编译
eng: 指该模块只在eng版本下才编译
tests: 指该模块只在tests版本下才编译
optional:指该模块在所有版本下都编译
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值