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
bpo-42405: fix C extensions build on Windows ARM64 #23399
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Thanks Adrian for preparing this. It's clear from the description that it's a draft, so I've marked it as such. Surely, it won't be reviewable until the existing CI passes. It appears this patch is meant to demonstrate the minimum changes to replace support for x86/amd64 with support for ARM, but whatever solution is accepted will need to remain compatible for x86 and amd64. |
The following changes are required: * add a new platform win-arm64 * replace the emulated compiler executable paths * bump the linker base addressed as ARM64 requires more memory this change might not be needed (investigation required) On Windows 10 ARM64, VS compiler paths look like this: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\ARM64\cl.exe Note that the cl.exe for ARM64 is an x32 binary, which can run emulated on Windows 10 ARM64 (it has builtin emulation for x32). The rc.exe and mc.exe paths have to also be changed, as the initial discovery has to be fixed.
Hello @jaraco, I have updated the code to be backwards compatible for the x86/x64 versions. The patch should pass the CI, although I am thinking of further cleaning the code by using a replace dictionary instead of the hardcoded in-place replacements. To keep the discussion in the right direction, this patch is used to build projects that have C-extensions and do rely on older VS implementation, like pywin32, cffi. There are probably other packages or older versions that have the same problem. Thank you, |
This PR is stale because it has been open for 30 days with no activity. |
@ader1990: Status check is done, and it's a success |
@ader1990: Status check is done, and it's a success |
Sorry, I can't merge this PR. Reason: |
@ader1990: Status check is done, and it's a success |
The following changes are required: * add a new platform win-arm64 * replace the emulated compiler executable paths * bump the linker base addressed as ARM64 requires more memory this change might not be needed (investigation required) On Windows 10 ARM64, VS compiler paths look like this: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\ARM64\cl.exe Note that the cl.exe for ARM64 is an x32 binary, which can run emulated on Windows 10 ARM64 (it has builtin emulation for x32). The rc.exe and mc.exe paths have to also be changed, as the initial discovery has to be fixed. Work in progress to remove the hardcoded bits and to change the path query fixes to the proper location. Automerge-Triggered-By: GH:jaraco
…23399)" (python#24753) This reverts commit cb7bc76.
The following changes are required: * add a new platform win-arm64 * replace the emulated compiler executable paths * bump the linker base addressed as ARM64 requires more memory this change might not be needed (investigation required) On Windows 10 ARM64, VS compiler paths look like this: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\ARM64\cl.exe Note that the cl.exe for ARM64 is an x32 binary, which can run emulated on Windows 10 ARM64 (it has builtin emulation for x32). The rc.exe and mc.exe paths have to also be changed, as the initial discovery has to be fixed. Work in progress to remove the hardcoded bits and to change the path query fixes to the proper location. Automerge-Triggered-By: GH:jaraco
…23399)" (python#24753) This reverts commit cb7bc76.
https://bugs.python.org/issue42405
Automerge-Triggered-By: GH:jaraco