Repository navigation
Commit b4cf77c
authored
Makefile: build macOS universal binary and use it in release script (#138)
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`.1 parent c7e4cdb commit b4cf77c
2 files changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments