Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a RTFM guardrail re: arm64e ABI #4

Merged
merged 1 commit into from
Jul 23, 2021
Merged
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
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