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

Refactor target triple handling #429

Merged
merged 1 commit into from
Feb 19, 2021

Conversation

messense
Copy link
Member

Currently maturin build --target xxx --universal2 would results in two --target xxx passed to cargo rustc which errored with:

error: specifying multiple `--target` flags requires `-Zmultitarget`
💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Failed to build a aarch64 library through cargo
  Caused by: Cargo build finished with "exit code: 101": `cargo rustc --message-format json --manifest-path Cargo.toml --target x86_64-apple-darwin --release --target aarch64-apple-darwin --bins --`

This patch changes how target is passed to compile_target function by remove it from cargo_extra_args and pass it directly into compile_target function.

@@ -145,6 +146,7 @@ impl Target {
os,
arch,
env: platform.target_env,
triple: platform.target_triple,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope that this is really the same target as cargo uses and we don't start cross-compiling where we wouldn't need to 🤞

@konstin
Copy link
Member

konstin commented Feb 19, 2021

Thanks!

@konstin konstin merged commit c4a4bf2 into PyO3:master Feb 19, 2021
@messense messense deleted the refactor-target-triple branch February 19, 2021 13:30
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