#!/bin/bash set -e cd "$(dirname "$0")" SDK="/Library/Developer/CommandLineTools/SDKs/MacOSX26.5.sdk" if [ ! -d "$SDK" ]; then SDK="/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk"; fi mkdir -p .build/release echo "Compiling apple-llm-polish with swiftc..." swiftc -O -parse-as-library -target arm64-apple-macosx26.0 -sdk "$SDK" \ Sources/AppleLLMPolish/main.swift -o .build/release/apple-llm-polish \ -framework Foundation -framework FoundationModels echo "Built: .build/release/apple-llm-polish" ls -lh .build/release/apple-llm-polish # check echo "=== check ===" .build/release/apple-llm-polish --check 2>&1 | head -20 echo "Copying to root copies..." cp .build/release/apple-llm-polish ../apple-llm-polish 2>/dev/null || true cp .build/release/apple-llm-polish ./apple-llm-polish 2>/dev/null || true echo "Done"