FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-149800: Fix macOS universal2 build of perf trampoline (GH-149894 follow-up) by pablogsal · Pull Request #150364 · python/cpython · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .in  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
16 changes: 14 additions & 2 deletions Makefile.pre.in
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
Original file line number Diff line number Diff line change
Expand Up @@ -3120,8 +3120,20 @@ 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 $@ $<

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
# On macOS universal2 builds, $(PY_CORE_CFLAGS) contains "-arch arm64 -arch x86_64",
# which would produce fat .o files containing both architectures for each .S input.
# lipo -create then refuses to combine them because they share architectures.
# Build each per-arch object with a single -arch flag before merging with lipo.
Python/asm_trampoline_universal2.o: $(srcdir)/Python/asm_trampoline_aarch64.S $(srcdir)/Python/asm_trampoline_x86_64.S
$(CC) -c $(filter-out -arch arm64 x86_64,$(PY_CORE_CFLAGS)) -arch arm64 \
-o Python/asm_trampoline_arm64-apple-darwin.o $(srcdir)/Python/asm_trampoline_aarch64.S
$(CC) -c $(filter-out -arch arm64 x86_64,$(PY_CORE_CFLAGS)) -arch x86_64 \
-o Python/asm_trampoline_x86_64-apple-darwin.o $(srcdir)/Python/asm_trampoline_x86_64.S
lipo -create -output $@ \
Python/asm_trampoline_arm64-apple-darwin.o \
Python/asm_trampoline_x86_64-apple-darwin.o
Comment thread
pablogsal marked this conversation as resolved.
Comment thread
pablogsal marked this conversation as resolved.
rm -f Python/asm_trampoline_arm64-apple-darwin.o \
Python/asm_trampoline_x86_64-apple-darwin.o

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
Loading

Back | FazBrowse Home | New Git URL