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

Build nothing on non-Apple systems #5

Merged
merged 2 commits into from
Jul 20, 2017
Merged

Conversation

Boddlnagg
Copy link
Contributor

@Boddlnagg Boddlnagg commented Jul 19, 2017

This just prevents the library from building and linking anything if the target system is not macOS or iOS. It also fixes the recognition of ARM64.

The changes have already been published as 2.0.2 on crates.io and fixes building on docs.rs, see e.g. https://docs.rs/coremidi-sys/2.0.1/x86_64-apple-darwin/coremidi_sys/

@jonas-k
Copy link
Owner

jonas-k commented Jul 20, 2017

In my opinion the build script should at least print a warning when being executed on platforms other than macOS and iOS. Since there is no use case I can think of where it makes sense to try to compile this library on other platforms in the first place, the warning message would not produce many false positives. But if the library is accidentally used on non supported platforms the errors become clearer.

@Boddlnagg
Copy link
Contributor Author

I don't know how to emit a custom warning. There's an option for build scripts, documented as

warning=MESSAGE is a message that will be printed to the main console after a build script has finished running. Warnings are only shown for path dependencies (that is, those you're working on locally), so for example warnings printed out in crates.io crates are not emitted by default.

I don't know if it's still correct that it won't be printed for crates.io crates now after rust-lang/cargo#3777 (I asked there).

But you can merge the PR and we can resolve this later, because I've already published the changes to crates.io anyway, so any further changes need to be release in a new version anyway.

@jonas-k
Copy link
Owner

jonas-k commented Jul 20, 2017

Ok I'll merge it and we improve informing the user later if there is a way to print the warnings. As far as I know there is a possibility to print warnings from the build script. To make those visible though the user needs to add the -vv flag.

@jonas-k jonas-k merged commit a2f0fee into jonas-k:master Jul 20, 2017
@Boddlnagg Boddlnagg deleted the other-os branch July 20, 2017 11:01
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

Successfully merging this pull request may close these issues.

2 participants