-
Notifications
You must be signed in to change notification settings - Fork 16
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
[RFC] support panic and target_has_atomic predicates #49
Conversation
5a10c16
to
05ec643
Compare
@Jake-Shadle Having looked at it, it seems too hard to maintain support for target-lexicon -- My suggestion would probably be to remove target-lexicon support -- it's just way too difficult to maintain support. (As a side note, I think it would be cool to also publish the minimal set of target features in |
I think supporting target-lexicon is still nice since it allows this crate to support non-builtin targets to some degree, and this crate's motivating use case was supporting krates by filtering target specific dependencies from the graph, which is a more limited use case than that of eg rustc itself as most target filtering done in cargo manifests is limited to the basics. So I don't see a strong need to support every possible component that could appear in a cfg expression unless someone actually has a strong use case for it. |
3826447
to
9286491
Compare
There are a couple of new predicates in Rust 1.60: `target_has_atomic` and `panic`. Here's a first cut at supporting them. The panic predicate depends both on native platform support (default behavior) and on a potential override through RUSTFLAGS. This can be handled in downstream libraries that need such overrides.
9286491
to
d47a0b5
Compare
OK, I've changed it to just return false for target-lexicon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Checklist
Description of Changes
There are a couple of new predicates in Rust 1.60:
target_has_atomic
and
panic
. Here's a first cut at supporting them.For now, skip implementing them in target-lexicon and always return false.
The panic predicate depends both on native platform support (default
behavior) and on a potential override through RUSTFLAGS. This can be
handled in downstream libraries that need to model such overrides.