build: produce universal binary for Apple Silicon and Intel#44
Open
samuelmburu wants to merge 2 commits into
Open
build: produce universal binary for Apple Silicon and Intel#44samuelmburu wants to merge 2 commits into
samuelmburu wants to merge 2 commits into
Conversation
Add ARCHS and ONLY_ACTIVE_ARCH flags to xcodebuild archive so CI produces a universal (arm64 + x86_64) binary on Apple Silicon runners. Update README to reflect Intel Mac support.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ARCHS="arm64 x86_64"andONLY_ACTIVE_ARCH=NOto thexcodebuild archivestep inrelease.ymlmacos-latestrunner is Apple Silicon, so without these flags the archive only includesarm64even though the Xcode project already lists both architectures
feature request)
How it works
The Xcode project already has
ARCHS = arm64 x86_64in its build settings — no project file changes needed.The two added flags simply make CI honour those settings, producing a fat/universal binary that runs
natively on both Apple Silicon and Intel Macs without Rosetta.
Test plan
xcodebuild -arch x86_64on an Intel Mac running macOS 15.7.7 (Sequoia) —lipo -infoconfirmsx86_64binarylipo -info SpreadPaper.app/Contents/MacOS/SpreadPapershould reportarm64 x86_64