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

macos: automatically provide required linker arguments #1539

merged 1 commit into from Apr 3, 2021


Copy link

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:

cc @messense I think you might have a macOS computer if you're interested in verifying whether this also works for you?

Because setuptools_rust and maturin set this config automatically you'll have to run plain cargo build inside a project which contains a pyo3 extension module to confirm (once removing any relevant config).

Copy link

messense commented Apr 3, 2021

🎉 It works perfectly on my machine with cargo build for the word-count example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants