Commit 1d010ee
committed
gh-149800: Fix macOS universal2 build of perf trampoline
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`.1 parent cb72193 commit 1d010ee
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3120 | 3120 | | |
3121 | 3121 | | |
3122 | 3122 | | |
| 3123 | + | |
| 3124 | + | |
3123 | 3125 | | |
3124 | | - | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
3125 | 3130 | | |
3126 | 3131 | | |
3127 | 3132 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments