|
@@ -18,10 +18,18 @@ rm -rf llama/build dist/darwin-*
|
|
|
echo "Building darwin arm64"
|
|
|
GOOS=darwin ARCH=arm64 GOARCH=arm64 make -j 8 dist
|
|
|
echo "Building darwin amd64 with AVX enabled"
|
|
|
-GOOS=darwin ARCH=amd64 GOARCH=amd64 CUSTOM_CPU_FLAGS="avx" make -j 8 dist
|
|
|
+GOOS=darwin ARCH=amd64 GOARCH=amd64 CUSTOM_CPU_FLAGS="avx" make -j 8 dist_exe
|
|
|
|
|
|
+# Generate the universal ollama binary for stand-alone usage: metal + avx
|
|
|
+lipo -create -output dist/ollama-darwin dist/darwin-arm64/bin/ollama dist/darwin-amd64/bin/ollama
|
|
|
|
|
|
+echo "Building darwin amd64 with runners"
|
|
|
+rm dist/darwin-amd64/bin/ollama
|
|
|
+GOOS=darwin ARCH=amd64 GOARCH=amd64 make -j 8 dist
|
|
|
+# Generate the universal ollama binary for the app bundle: metal + no-avx
|
|
|
lipo -create -output dist/ollama dist/darwin-arm64/bin/ollama dist/darwin-amd64/bin/ollama
|
|
|
+
|
|
|
+
|
|
|
if [ -n "$APPLE_IDENTITY" ]; then
|
|
|
codesign --deep --force --options=runtime --sign "$APPLE_IDENTITY" --timestamp dist/ollama
|
|
|
else
|
|
@@ -48,5 +56,4 @@ ditto -c -k --keepParent dist/ollama dist/temp.zip
|
|
|
if [ -n "$APPLE_IDENTITY" ]; then
|
|
|
xcrun notarytool submit dist/temp.zip --wait --timeout 10m --apple-id $APPLE_ID --password $APPLE_PASSWORD --team-id $APPLE_TEAM_ID
|
|
|
fi
|
|
|
-mv dist/ollama dist/ollama-darwin
|
|
|
rm -f dist/temp.zip
|