clean up cmake build directory when cross compiling macOS builds

This commit is contained in:
Jeffrey Morgan
2024-01-09 17:13:51 -05:00
parent e868c8a5c7
commit 34344d801c
2 changed files with 4 additions and 4 deletions

View File

@@ -8,9 +8,9 @@ export GOFLAGS="'-ldflags=-w -s \"-X=github.com/jmorganca/ollama/version.Version
mkdir -p dist
for TARGETARCH in arm64 amd64; do
rm -rf llm/llama.cpp/build
GOOS=darwin GOARCH=$TARGETARCH go generate ./...
CGO_ENABLED=1 GOOS=darwin GOARCH=$TARGETARCH go build -o dist/ollama-darwin-$TARGETARCH
rm -rf llm/llama.cpp/*/build
done
lipo -create -output dist/ollama dist/ollama-darwin-*