Files
clang-p2996/lldb/test/API/macosx/posix_spawn/Makefile
Jonas Devlieghere 98e50a7d4c [lldb] Honor the CPU type & subtype when launching on macOS
Honor the CPU type (and subtype) when launching the inferior on macOS.

Part of this functionality was thought to be no longer needed and
removed in 85bd436961, however it's still
needed, for example to launch binaries under Rosetta 2 on Apple Silicon.

This patch will use posix_spawnattr_setarchpref_np if available and
fallback to posix_spawnattr_setbinpref_np if not.

Differential revision: https://reviews.llvm.org/D95922
2021-02-03 13:42:00 -08:00

19 lines
434 B
Makefile

EXE := fat.out
LIPO=lipo
include Makefile.rules
all: fat.out
x86_64.out: x86_64.c
$(CC) -isysroot $(SDKROOT) -target x86_64-apple-macosx10.9 -o x86_64.out $<
x86_64h.out: x86_64h.c
$(CC) -isysroot $(SDKROOT) -target x86_64h-apple-macosx10.9 -o x86_64h.out $<
arm64.out: arm64.c
$(CC) -isysroot $(SDKROOT) -target arm64-apple-macosx10.9 -o arm64.out $<
fat.out: x86_64.out x86_64h.out arm64.out
$(LIPO) -o fat.out -create $^