macos: automatically provide required linker arguments #1539
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.
This PR removes the need for specifying macOS linker arguments in
.cargo/config
- we can feed them in directly in the build script.I tested this on my wife's macbook air, and it seems to work. According to the cargo changelog, the
rustc-cdylib-link-arg
key has been supported since Rust 1.35: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-135-2019-05-23cc @messense I think you might have a macOS computer if you're interested in verifying whether this also works for you?
Because
setuptools_rust
andmaturin
set this config automatically you'll have to run plaincargo build
inside a project which contains a pyo3 extension module to confirm (once removing any relevant config).