Skip to content

Commit

Permalink
Merge pull request #63 from godaddy/MacOSVer
Browse files Browse the repository at this point in the history
Attempt to set the version of MacOS we are compiled against
  • Loading branch information
jgowdy authored Oct 12, 2023
2 parents c39f225 + 135f362 commit 7d7b4ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/macos-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -xeu

export CFLAGS=-mmacosx-version-min=10.0
export CXXFLAGS=-mmacosx-version-min=10.0
export CGO_CFLAGS=-mmacosx-version-min=10.0
export CGO_CXXFLAGS=-mmacosx-version-min=10.0

CGO_ENABLED=1 GOOS=darwin GODEBUG=cgocheck=0 GOARCH=arm64 go build -v -buildmode=c-archive -ldflags='-s -w' -o output/libasherah-darwin-arm64.a
mv output/libasherah-darwin-arm64.h output/libasherah-darwin-arm64-archive.h
LD_RUN_PATH=\$ORIGIN CGO_ENABLED=1 GODEBUG=cgocheck=0 GOOS=darwin GOARCH=arm64 go build -v -buildmode=c-shared -ldflags='-s -w' -o output/libasherah-arm64.dylib
Expand Down

0 comments on commit 7d7b4ab

Please sign in to comment.