gh-149800: Fix macOS universal2 build of perf trampoline#150365
Closed
eendebakpt wants to merge 2 commits into
Closed
gh-149800: Fix macOS universal2 build of perf trampoline#150365eendebakpt wants to merge 2 commits into
eendebakpt wants to merge 2 commits into
Conversation
After splitting the perf trampoline into per-architecture .S files,
PY_CORE_CFLAGS still carries `-arch arm64 -arch x86_64` on universal2
builds, so each per-arch object becomes a fat Mach-O whose wrong-arch
slice is empty (thanks to the `#ifdef` guards in the sources). `lipo
-create` then refused to merge two fat inputs sharing both
architectures:
fatal error: lipo: Python/asm_trampoline_aarch64.o and
Python/asm_trampoline_x86_64.o have the same architectures (x86_64)
and can't be in the same fat output file
Extract the matching slice from each per-arch object with `lipo -thin`
before recombining into `asm_trampoline_universal2.o`.
Member
|
Looks like @pablogsal was a couple of minutes ahead of you: duplicate of #150364 |
Contributor
Author
Yeah, he beat me by a minute. I'll close this one, his approach is similar to this one. |
Member
|
Thanks for jumping on it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address failing JIT CI, see https://github.com/python/cpython/actions/runs/26343871355/job/77550446716?pr=150324
Claude analysis:
After splitting the perf trampoline into per-architecture .S files in #149894, PY_CORE_CFLAGS still carries
-arch arm64 -arch x86_64on universal2 builds, so each per-arch object becomes a fat Mach-O whose wrong-arch slice is empty (thanks to the#ifdefguards in the sources).lipo -createthen refused to merge two fat inputs sharing both architectures:Extract the matching slice from each per-arch object with
lipo -thinbefore recombining intoasm_trampoline_universal2.o.The PR #149894 passed because it did not trigger jit builds.
Marking as DO-NOT-MERGE until someone can verify the above is correct.