Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add patch for Apple cross compilation on 3.13+#323

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
zanieb merged 1 commit intomainfromzb/3.13-apple-cross
Sep 8, 2024

Conversation

@zanieb
Copy link
Member

@zaniebzanieb commentedSep 7, 2024
edited
Loading

Following up on#319 — adds a patch to support cross-compilation as we do for previous Python versions.

@zanieb
Copy link
MemberAuthor

@indygreg could you give me some context on testing this since it's not needed for CI to pass?

Copy link
Collaborator

@indygregindygreg left a comment

Choose a reason for hiding this comment

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

You test this by passing--target-triple to./build-macos.py targeting the non-native target. So from Apple Silicon you want--target-triple x86_64-apple-darwin to cross-compile to x86-64. A working build is almost certainly sign of success.

To test from CI, you could switch the macOS runners to a new/old version to force cross-compiles. PGO and BOLT would stop working. But it otherwise shouldjust work.

@zanieb
Copy link
MemberAuthor

Ah okay that makes sense — I was wondering why CI didn't cross compile if we were patching for it and thought maybe this was for some other target.

This fails for me:

cpython-3.13> configure: error: cross build not supported for x86_64-apple-darwin

I'll play with the patch some more.

@indygreg
Copy link
Collaborator

CPython's build system has historically made some questionable decisions about how to build on/for Apple platforms. e.g. they've historically not supported cross-compiling (unless doing a multi-arch "universal" build) despite cross-compiling for Apple platforms being probably one of the easiest platforms to cross-compile for!

My guess is they tweaked more configure checks in this area (possibly as part of shoring up iOS support) and created more work for us in the process.

We don't need to support cross-compiles anymore. Historically I needed it because GitHub Actions didn't have macOS ARM runners. At the moment we have x86-64 and ARM macOS runners and all is well.

zanieb reacted with thumbs up emoji

@zanieb
Copy link
MemberAuthor

It actually is really nice to be able to cross-compile so I can test the x86_64 builds from my laptop. Our builds are also slowed down by GitHub's concurrent macOS job limit (only 5). There are alternative platforms that provide macOS runners that would let us have a higher concurrency limit, but they only support ARM. I'll probably try to fix it slowly.

@zanieb
Copy link
MemberAuthor

Alright turned out to be pretty easy, works locally.

@zaniebzanieb merged commit523c1ed intomainSep 8, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@indygregindygregindygreg approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@zanieb@indygreg

[8]ページ先頭

©2009-2025 Movatter.jp