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

fix: cross-compilation compatibility checks for Windows #4800

Merged
merged 3 commits into from
Dec 31, 2024

Conversation

kahojyun
Copy link
Contributor

pyo3-build-config has an is_cross_compiling_from_to check which returns false when compiling for 32-bit on 64-bit Windows, but the check doesn't take Windows on Arm into consideration and simply returns false when both host and target are Windows, resulting in compilation failure when cross-compiling for aarch64 on x86-64 Windows.

This PR fixes the check according to the original comment, and marutin build --target aarch64-pc-windows-msvc works as expected on x86-64 Windows with MSVC toolchain.

Related Issue: PyO3/maturin#2368

I wonder if this PR should be merged with #4773.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks, will rebase my PR after this merges 👍

@davidhewitt davidhewitt added this pull request to the merge queue Dec 31, 2024
Merged via the queue into PyO3:main with commit 54735da Dec 31, 2024
46 checks passed
davidhewitt pushed a commit that referenced this pull request Jan 3, 2025
* fix: cross-compilation compatibility checks for Windows

* add newsfragments

* add simple test
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