-
Notifications
You must be signed in to change notification settings - Fork 690
Add more cfg aliases #2205
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
Add more cfg aliases #2205
Conversation
Add cfg aliases for linux_android, bsd, and freebsdlike. Use them in many places, though not everywhere they could theoretically be used. Fixes nix-rust#2188
a04528b
to
74477b4
Compare
Should we also do this for Solaris and Illumos? cfg_aliases! {
illumos: { target_os = "illumos" },
solaris: { target_os = "solaris" },
solarish: { any(solaris, illumos) }
} BTW, we should document this in probably |
Co-authored-by: SteveLauC <[email protected]>
Co-authored-by: SteveLauC <[email protected]>
Are other config-aliases, like an alias #[cfg(all(
feature = "socket",
feature = "uio",
any(
target_os = "linux",
target_os = "android",
target_os = "freebsd",
target_os = "netbsd",
),
))] desirable for the future? Or should they just stay platform-related for the time being? |
I think we can add them on an as-needed basis. |
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd", | ||
bsd, | ||
target_os = "redox", | ||
target_os = "aix", | ||
target_os = "illumos", |
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.
Another place where we can use solarish
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd", | ||
bsd, | ||
target_os = "redox", | ||
target_os = "aix", | ||
target_os = "illumos", |
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.
Should be: solarish
I just checked that the changes made in this PR are good. But there are also still For #2188, let's turn it into a tracking issue, once the tasks in it are all done, then we can close it. For the requested changes, I have committed 2 with the GitHub UI, please ignore the left ones and handle them in other PRs |
Add cfg aliases for linux_android, bsd, and freebsdlike. Use them in many places, though not everywhere they could theoretically be used.
Fixes #2188
What does this PR do
Checklist:
CONTRIBUTING.md