Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -3120,8 +3120,13 @@ Python/asm_trampoline_aarch64.o: $(srcdir)/Python/asm_trampoline_aarch64.S
Python/asm_trampoline_riscv64.o: $(srcdir)/Python/asm_trampoline_riscv64.S
$(CC) -c $(PY_CORE_CFLAGS) -o $@ $<

# Extract the matching slice from each fat per-arch object before lipo -create,
# which rejects two fat inputs that share architectures.
Python/asm_trampoline_universal2.o: Python/asm_trampoline_aarch64.o Python/asm_trampoline_x86_64.o
lipo -create -output $@ Python/asm_trampoline_aarch64.o Python/asm_trampoline_x86_64.o
lipo -thin arm64 Python/asm_trampoline_aarch64.o -output $@.arm64
lipo -thin x86_64 Python/asm_trampoline_x86_64.o -output $@.x86_64
lipo -create -output $@ $@.arm64 $@.x86_64
rm -f $@.arm64 $@.x86_64

Python/emscripten_trampoline_inner.wasm: $(srcdir)/Python/emscripten_trampoline_inner.c
# emcc has a path that ends with emsdk/upstream/emscripten/emcc, we're looking for emsdk/upstream/bin/clang.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix macOS universal2 build of the perf trampoline. After the per-architecture
split in :gh:`149800`, the ``arm64`` and ``x86_64`` trampoline objects were
each compiled as fat Mach-O files, and ``lipo -create`` refused to merge them.
Loading