Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rules] Rename and change semantiv of extra_bazel_features #26543

Open
wants to merge 1 commit into
base: earlgrey_1.0.0
Choose a base branch
from

Conversation

pamaury
Copy link
Contributor

@pamaury pamaury commented Mar 6, 2025

Manual backport of #26068

The extra_bazel_features attribute was added #25840 as an attribute to rv_rule to transitively add features to the rule. However this is too general because when applied to opentitan_binary, it will change the features not only for the rule, but all its dependencies such as exec_env, tools, etc which may have unintended effects.

This commit keeps essentially the same logic but instead of applying it to rv_rule, it is now only an attribute of opentitan_binary and opentitan_test and it transitions only features for the deps. This attribute is also renamed to transitive_features. The rationale for the rename is that every bazel rule has an implicit features argument but it only applies to the target, not its dependencies. This attribute does the same but also applies transitively.

The `extra_bazel_features` attribute was added lowRISC#25840 as an attribute
to `rv_rule` to transitively add features to the rule. However this is
too general because when applied to opentitan_binary, it will change
the features not only for the rule, but all its dependencies such as
exec_env, tools,  etc which may have unintended effects.

This commit keeps essentially the same logic but instead of applying
it to `rv_rule`, it is now only an attribute of `opentitan_binary`
and `opentitan_test` and it transitions only features for the `deps`.
This attribute is also renamed to `transitive_features`. The rationale
for the rename is that every bazel rule has an implicit `features`
argument but it only applies to the target, not its dependencies. This
attribute does the same but also applies transitively.

Signed-off-by: Amaury Pouly <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants