Skip to content

Commit

Permalink
Attempt to set the version of MacOS we are compiled against
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdy committed Oct 12, 2023
1 parent c39f225 commit 135f362
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 135f362

Please sign in to comment.