gh-90905: Allow cross-compilation on macOS#128385
Conversation
|
This seems a bit too easy. I'm curious if I'm missing something? The justification for the configure flags are as follows:
It's unclear to me if it's expected that the I also checked the |
|
I think that @ned-deily and @ronaldoussoren have interests with this patch. |
FFY00
left a comment
There was a problem hiding this comment.
The change looks correct to me.
I'll approve, but give @ned-deily some time to look it over before merging. @zanieb if this doesn't happen within a week, please ping me to move it forward. Thanks!
|
Thanks for the PR. The change looks OK so I'm merging it for 3.14. But, IMO, I wouldn't recommend using this approach for most uses. There is a reason that we haven't bothered to support the "traditional" style of cross-building for macOS builds and that is because essentially the same result can be accomplished through the use of macOS universal builds, something that has been around in Python for many years and which is robust and well-tested. For example, the current In the meantime, it might be a very useful interim experiment for someone to try to provide a script that |
|
As an example, a very simple universal build rough equivalent: And, the one-time commands to build and install the universal libs from MacPorts: |
|
|
Thanks for the explanation @ned-deily — there is some discussion on universal builds downstream astral-sh/python-build-standalone#140 |
|
So #90905 can be closed? |
Adds support for cross-compiling x86_64 from arm64 macOS. This is particularly useful due to the decreasing availability of x86_64 machines to perform builds on.
The changes here are loosely based on the patch that
python-build-standaloneuses for cross-compiling.I tested compiling x86_64 from an arm64 machine with the following script: