GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-149800: Fix macOS universal2 build of perf trampoline by eendebakpt · Pull Request #150365 · python/cpython

Conversation

@eendebakpt

@eendebakpt eendebakpt commented May 24, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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_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.

The PR #149894 passed because it did not trigger jit builds.

Marking as DO-NOT-MERGE until someone can verify the above is correct.

  • Issue: Refactor perf trampoline proposal: split the assembly per architecture, auto-generate DWARF unwind data #149800

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@eendebakpt
pythongh-149800: Fix macOS universal2 build of perf trampoline
1d010ee
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`.
@eendebakpt
eendebakpt requested review from AA-Turner, emmatyping and erlend-aasland as code owners May 24, 2026 19:34
@eendebakpt eendebakpt added the DO-NOT-MERGE label May 24, 2026
@bedevere-app bedevere-app Bot added the awaiting review label May 24, 2026
@bedevere-app bedevere-app Bot mentioned this pull request May 24, 2026
Refactor perf trampoline proposal: split the assembly per architecture, auto-generate DWARF unwind data #149800
Open
@eendebakpt
Merge branch 'main' into fix-universal2-trampoline
1ddf61b
@ned-deily

ned-deily commented May 24, 2026

Copy link
Copy Markdown
Member

Looks like @pablogsal was a couple of minutes ahead of you: duplicate of #150364

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eendebakpt

eendebakpt commented May 24, 2026

Copy link
Copy Markdown
Contributor Author

Looks like @pablogsal was a couple of minutes ahead of you: duplicate of #150364

Yeah, he beat me by a minute. I'll close this one, his approach is similar to this one.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eendebakpt eendebakpt closed this May 24, 2026
@ned-deily

ned-deily commented May 24, 2026

Copy link
Copy Markdown
Member

Thanks for jumping on it!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner
@emmatyping emmatyping Awaiting requested review from emmatyping emmatyping is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review DO-NOT-MERGE

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@eendebakpt @ned-deily
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.