diff --git a/scripts/macos-build.sh b/scripts/macos-build.sh index ec315b6..645fda1 100755 --- a/scripts/macos-build.sh +++ b/scripts/macos-build.sh @@ -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