Skip to content

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
davidhewitt pushed a commit that referenced this pull request Jan 11, 2025
* fix: cross-compilation compatibility checks for Windows

* add newsfragments

* add simple test
JeanArhancet pushed a commit to JeanArhancet/pyo3 that referenced this pull request Jan 17, 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