admin管理员组文章数量:1356709
I'm working on a project that has a CI pipeline the builds and runs tests automatically. The CI scripts are not likely to change. The tests are built in CI with the following flags: --feature=ABC
Due to some requirements, I need to disable this feature in one of the Bazel target (cc_test
). Because it'll affect too many areas if I change the CI scripts, I wonder if it is possible to just remove this --feature=ABC
from this single Bazel target.
I'm working on a project that has a CI pipeline the builds and runs tests automatically. The CI scripts are not likely to change. The tests are built in CI with the following flags: --feature=ABC
Due to some requirements, I need to disable this feature in one of the Bazel target (cc_test
). Because it'll affect too many areas if I change the CI scripts, I wonder if it is possible to just remove this --feature=ABC
from this single Bazel target.
1 Answer
Reset to default 0Yes. As described in the docs:
features
List of feature strings; default is [] A feature is string tag that can be enabled or disabled on a target. The meaning of a feature depends on the rule itself. Thisfeatures
attribute is combined with the package levelfeatures
attribute. For example, if thefeatures
["a", "b"] are enabled on the package level, and a target's features attribute contains ["-a", "c"], the features enabled for the rule will be "b" and "c". See example.
Or in short, in your case, for relevant cc_*
targets add to make sure feature "ABC" is disabled for that target.
features = ["-ABC"],
本文标签:
版权声明:本文标题:bazel - How to exclude a parameter from a target - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743960262a2568892.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论