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

target_os groups? #71

Open
johalun opened this issue Sep 18, 2024 · 2 comments
Open

target_os groups? #71

johalun opened this issue Sep 18, 2024 · 2 comments

Comments

@johalun
Copy link
Owner

johalun commented Sep 18, 2024

Is there such a thing, or can such a thing be created that will allow us to do

#[cfg(not(any(target_os = "apple-like")))]

or

#[cfg(not(any(target_vendor = "apple")))]

instead of

#[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "visionos")))]
@asomers
Copy link
Contributor

asomers commented Sep 18, 2024

Yes. Just use the cfg-aliases crate. See https://github.com/nix-rust/nix/blob/master/build.rs for a usage example.

@johalun
Copy link
Owner Author

johalun commented Sep 18, 2024

Nice, thanks!

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

No branches or pull requests

2 participants