-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
gh-90905: Allow cross-compilation on macOS #128385
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
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-standalone
uses for cross-compiling.I tested compiling x86_64 from an arm64 machine with the following script: