-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Improvements to --print cfg
#31671
Improvements to --print cfg
#31671
Conversation
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
Thanks! I specifically didn't include To me, though, the bug with us not querying these values from LLVM is also somewhat of a blocker as the information here is likely false. |
I am already working on a fix for #31662 that extracts the feature set from LLVM. I will resume working on this after that. |
I think it'd be fine to just not fill it in, but it would degrade the quality of the error message if you tried to use it on the stable/beta channels. I think that's fine in terms of sharing implementations, however. |
☔ The latest upstream changes (presumably #31882) made this pull request unmergeable. Please resolve the merge conflicts. |
The `--print` flag was extended in rust-lang#31278 to accept `cfg`, but the usage message was not updated.
The configuration returned by `config::build_configuration` needs to be modified with `target_features::add_configuration` in order to also contain the target features. This is already done for the configuration used when compiling and when creating the documentation, but was missing in the `cfg` printing code.
The branch has been to fix the conflict. The difference is now much smaller, as it only makes the As pointed out by @alexcrichton, the flags that are added to the |
Currently, however, |
Gated cfg attributes are not available on the stable and beta release channels, therefore they should not be presented to users of those channels in order to avoid confusion.
I managed to find how to filter out the gated cfg, so that |
Show `cfg` as possible argument to `--print` and make it so that `--print cfg` also outputs the `target_feature`s. Should I also extend `src/test/run-make/print-cfg/Makefile` to check that `target_feature`s are actually printed?
⌛ Testing commit 4e46eee with merge e91f889... |
Show
cfg
as possible argument to--print
and make it so that--print cfg
also outputs thetarget_feature
s.Should I also extend
src/test/run-make/print-cfg/Makefile
to check thattarget_feature
s are actually printed?