Skip to content

Commit

Permalink
Merge pull request #4 from donaldguy/canon
Browse files Browse the repository at this point in the history
Create a RTFM guardrail re: arm64e ABI
  • Loading branch information
xorpse authored Jul 23, 2021
2 parents c91a32f + e2fe290 commit c35ef0a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ YABAI_ARM_SRC = ./src/manifest.m $(OSAX_ARM_SRC)

BINS = $(BUILD_PATH)/yabai $(BUILD_PATH)/yabai-x86_64 $(BUILD_PATH)/yabai-arm64

MARKDOWN_CAT = $(if $(shell which glow),glow,cat)

.PHONY: all clean install sign archive man

all: clean-build $(BINS)
Expand Down Expand Up @@ -79,6 +81,7 @@ $(BUILD_PATH)/yabai-x86_64: $(YABAI_X86_64_SRC)
$(CLANG_PATH) $^ -arch x86_64 $(BUILD_FLAGS) $(FRAMEWORK_PATH) $(FRAMEWORK) -isysroot "$(SDK_PATH)" -o $@

$(BUILD_PATH)/yabai-arm64: $(YABAI_ARM_SRC)
sysctl kern.bootargs | grep -q -- -arm64e_preview_abi || (echo >&2 "\n\nBooted w/o arm64e ABI support!"; $(MARKDOWN_CAT) README-arm64.md >&2; exit 1) #technically we can build the binary w/o the abi enabled, but output will be immediately SIGSEVEd
mkdir -p $(BUILD_PATH)
$(CLANG_PATH) $^ -arch arm64e $(BUILD_FLAGS) $(FRAMEWORK_PATH) $(FRAMEWORK) -isysroot "$(SDK_PATH)" -o $@

Expand Down

0 comments on commit c35ef0a

Please sign in to comment.