diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-12-22 14:34:42 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-12-22 14:34:42 -0500 |
| commit | 0ee53cd5a79d41b124413d5da3e4279d06b17bfc (patch) | |
| tree | 4e4a91c9040a3192398e6ed452dbcbe85ab9d471 | |
| parent | 01cbec2d67399b7e8d18d409d1b1eccf00aba733 (diff) | |
Attempted improvements for building on mac
| -rw-r--r-- | .github/workflows/release.yml | 32 | ||||
| -rw-r--r-- | Makefile | 2 |
2 files changed, 28 insertions, 6 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d6c5dba..2be7084e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,10 @@ on: tags: - 'v*' +permissions: + contents: write + packages: write + jobs: linux-x86_64: runs-on: ubuntu-latest @@ -84,10 +88,31 @@ jobs: brew update brew install gmp libunistring bdw-gc llvm binutils - - name: Build + - name: Build arm64 run: | make clean - make -j + make -j \ + CC=clang \ + CFLAGS="-arch arm64" \ + LDFLAGS="-arch arm64" + mv build/tomo build/tomo-arm64 + + - name: Build x86_64 + run: | + make clean + make -j \ + CC=clang \ + CFLAGS="-arch x86_64" \ + LDFLAGS="-arch x86_64" + mv build/tomo build/tomo-x86_64 + + - name: Create universal binary + run: | + lipo -create \ + build/tomo-arm64 \ + build/tomo-x86_64 \ + -output build/tomo + lipo -info build/tomo - name: Package run: | @@ -102,6 +127,3 @@ jobs: tomo-macos-universal.tar.gz tomo-macos-universal.tar.gz.sha256 -permissions: - contents: write - packages: write @@ -83,7 +83,7 @@ O=-O3 # Note: older versions of Make have buggy behavior with hash marks inside strings, so this ugly code is necessary: TOMO_VERSION=$(shell awk 'BEGIN{hashes=sprintf("%c%c",35,35)} $$1==hashes {print $$2; exit}' CHANGES.md) GIT_VERSION=$(shell git log -1 --pretty=format:"%as_%h" 2>/dev/null || echo "unknown") -CFLAGS=$(CCONFIG) $(INCLUDE_DIRS) $(EXTRA) $(CWARN) $(G) $(O) $(OSFLAGS) $(LTO) \ +CFLAGS += $(CCONFIG) $(INCLUDE_DIRS) $(EXTRA) $(CWARN) $(G) $(O) $(OSFLAGS) $(LTO) \ -DSUDO='"$(SUDO)"' -DDEFAULT_C_COMPILER='"$(DEFAULT_C_COMPILER)"' \ -DGIT_VERSION='"$(GIT_VERSION)"' CFLAGS_PLACEHOLDER="$$(printf '\033[2m<flags...>\033[m\n')" |
