Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: xcrun wrapper to force Metal compiler deployment target to 14.0

Louis Beaumont1ceba5c71370
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index 57fe2c7a6..eec9a651f 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -870,6 +870,45 @@ jobs:
echo "Cleaning mlx-sys build cache..."
find "apps/screenpipe-app-tauri/src-tauri/target/${TARGET}/release/build" -maxdepth 1 -name "mlx-sys-*" -exec rm -rf {} + 2>/dev/null || true
+ # Force CMake to use macOS 14.0 deployment target for MLX Metal kernels.
+ # The cmake/cc crates inject --target=arm64-apple-macosx -mmacosx-version-min=10.13
+ # into CMAKE_C_FLAGS, and CMake derives CMAKE_OSX_DEPLOYMENT_TARGET=10.13 from that.
+ # This breaks MLX Metal kernels which need MSL 3.0+ (macOS 14+).
+ # Workaround: wrap xcrun to replace the version-min flag for metal compiler calls.
+ if [[ "${{ matrix.target }}" == "aarch64-apple-darwin" ]]; then
+ WRAPPER_DIR="$(pwd)/.metal-wrapper"
+ mkdir -p "$WRAPPER_DIR"
+ cat > "$WRAPPER_DIR/xcrun" << 'WRAPPER'
+ #!/bin/bash
+ args=("$@")
+ # Check if this is a metal compiler invocation
+ is_metal=false
+ for arg in "${args[@]}"; do
+ if [[ "$arg" == "metal" ]]; then
+ is_metal=true
+ break
+ fi
+ done
+ if $is_metal; then
+ # Replace old deployment target with 14.0 for Metal compiler
+ new_args=()
+ for arg in "${args[@]}"; do
+ if [[ "$arg" == -mmacosx-version-min=* ]]; then
+ new_args+=("-mmacosx-version-min=14.0")
+ else
+ new_args+=("$arg")
+ fi
+ done
+ exec /usr/bin/xcrun "${new_args[@]}"
+ else
+ exec /usr/bin/xcrun "${args[@]}"
+ fi
+ WRAPPER
+ chmod +x "$WRAPPER_DIR/xcrun"
+ export PATH="$WRAPPER_DIR:$PATH"
+ echo "Installed xcrun wrapper to force -mmacosx-version-min=14.0 for Metal"
+ fi
+
for attempt in $(seq 1 $MAX_ATTEMPTS); do
echo "=== Build attempt $attempt/$MAX_ATTEMPTS ==="
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index a42980dfd..eab8fde26 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -9616,7 +9616,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.2.262"
+version = "2.2.263"
dependencies = [
"anyhow",
"arboard",
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index 35d75465b..dcbaea67f 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "2.2.262"
+version = "2.2.263"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""