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

Document recommendation for "marker" features in rules based toolchain #333

Open
keith opened this issue Jan 29, 2025 · 0 comments
Open

Comments

@keith
Copy link
Member

keith commented Jan 29, 2025

Bazel has quite a few "marker" type features where their presence in the toolchain is used as a signal that it supports some configuration. Here are a few examples:

https://github.com/bazelbuild/apple_support/blob/af8d93a33586c80bf2d245922ce31fcd109fe645/crosstool/cc_toolchain_config.bzl#L2666-L2678

In this case with the rules based toolchain I've found I can generally do:

cc_feature(
    name = "archive_param_file",
    feature_name = "archive_param_file",
)

and then shoving those in enabled_features or known_features. This works fine but I wonder if it's worth trying to reduce the overhead of this for these types of features? Especially since the potential names are technically special, and we likely don't want to encourage folks to copy paste them everywhere. Maybe we should add all of these definitions to this repo, and then allow users to pull them in still?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants