-
Notifications
You must be signed in to change notification settings - Fork 38
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
Various changes to the build script #28
Merged
Merged
Commits on Jul 26, 2019
-
They cause the following warnings: warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ cfg = "...")]` --> /tmp/coreaudio-sys/target/x86_64-apple-darwin/debug/build/coreaudio-sys-0d8fd082e359c2ec/out/coreaudio.rs:3:1 | 3 | #[link = "/tmp/MacOSX10.14.sdk/System/Library/Frameworks/AudioToolbox"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(ill_formed_attribute_input)] on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 <rust-lang/rust#57571> And they are actually redundant with the cargo:rustc-link-lib lines the build script prints already.
Configuration menu - View commit details
-
Copy full SHA for 62f6e22 - Browse repository at this point
Copy the full SHA 62f6e22View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7150b8c - Browse repository at this point
Copy the full SHA 7150b8cView commit details
Commits on Aug 6, 2019
-
Simplify and fix bindgen setup both for native and cross compilation
The current setup requires 2 environment variables for cross-compilation, and can fail to build under some circumstances on a freshly installed OSX + Xcode machine. This change simplifies the setup by: - On native builds, using `xcrun --show-sdk-path` instead of `xcode-select -p` to find the SDK. - On cross builds, checking COREAUDIO_SDK_PATH. - Pass --target to clang, which makes things work for cross-compilation with plain clang (as opposed to osxcross). - Pass -isysroot to clang instead of -F, which makes it find all possible headers in the SDK, especially TargetConditionals.h, which lives in $COREAUDIO_SDK_PATH/usr/include. - Instruct cargo of the environment variables that affect the build script. COREAUDIO_CFLAGS is left as a convenience, for now.
Configuration menu - View commit details
-
Copy full SHA for 7659009 - Browse repository at this point
Copy the full SHA 7659009View commit details -
Update bindgen build dependency to 0.50
As of 0.49, bindgen supports a BINDGEN_EXTRA_CLANG_ARGS environment variable that can be used to pass extra arguments to clang. This can be used instead of COREAUDIO_CFLAGS.
Configuration menu - View commit details
-
Copy full SHA for 5277523 - Browse repository at this point
Copy the full SHA 5277523View commit details -
Re-enable rustfmt of generated bindings
Because recent versions of bindgen generate their bindings on one line, because of bindgen's use of u128 and rust's warnings of its unsafety FFI-wise, and because of rust-lang/rust#62999, combined, building the crate generates massive logs... which exceed travis's maximum log length. It was disabled in RustAudio#13 because back then rustfmt had some problems with the bindgen output. Now that rustfmt is part of rust, these kind of problems presumably should happen less if at all.
Configuration menu - View commit details
-
Copy full SHA for 7a51ced - Browse repository at this point
Copy the full SHA 7a51cedView commit details -
Panic instead of printing errors in the build script
Simply printing errors to stderr does nothing visible by default. So when building without an SDK available, there is no apparent error showing up other than in some file "hidden" in target/, and an error that including coreaudio.rs failed. Similarly, when attempting to build for an unsupported target, the script reaches the `unreachable!()`.
Configuration menu - View commit details
-
Copy full SHA for 2edcf2e - Browse repository at this point
Copy the full SHA 2edcf2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8dd06b5 - Browse repository at this point
Copy the full SHA 8dd06b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e87594 - Browse repository at this point
Copy the full SHA 7e87594View commit details -
Simplify the build script further
Instead of passing the full paths to the headers to bindgen, create a meta header that #include's all the needed ones. This leaves it to clang to find them in the right /System/Library/Frameworks directory.
Configuration menu - View commit details
-
Copy full SHA for 8b6ebfd - Browse repository at this point
Copy the full SHA 8b6ebfdView commit details -
Allow the SDK not to be found by the build script
Now that the build script itself doesn't need the SDK path, allow not to specify one explicitly. This allows things to work out when the environment works out of the box one way or another (via wrapper scripts, setting BINDGEN_EXTRA_CLANG_ARGS, etc.)
Configuration menu - View commit details
-
Copy full SHA for d2e8a69 - Browse repository at this point
Copy the full SHA d2e8a69View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ed7f4c - Browse repository at this point
Copy the full SHA 0ed7f4cView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.