Skip to content

Build macOS universal binary (arm64 + x86_64)#138

Merged
plusvic merged 1 commit into
masterfrom
macos_universal
Jul 7, 2026
Merged

Build macOS universal binary (arm64 + x86_64)#138
plusvic merged 1 commit into
masterfrom
macos_universal

Conversation

@karlhiramoto

Copy link
Copy Markdown
Member

This PR updates the build process to generate a macOS universal binary containing both x86_64 and arm64 architectures.

Previously, the macOS binary was x86_64 only (vt: Mach-O 64-bit executable x86_64), which required Rosetta 2 to run on Apple Silicon Macs. This change fixes the binary for Apple Silicon machines that do not have Rosetta 2 installed.

Changes:

  • Updated Makefile to compile both darwin/amd64 and darwin/arm64, then combine them using lipo.
  • Added a fallback to makefat (via go run) when lipo is not available, ensuring that the build still succeeds on Linux-based CI runners (like GitHub Actions ubuntu-latest).
  • Updated new_release.sh to package the universal binary in MacOSX.zip.

@plusvic plusvic merged commit b4cf77c into master Jul 7, 2026
10 checks passed
@plusvic plusvic deleted the macos_universal branch July 7, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants