#!/bin/sh
# Strip rust.metadata.bin from .rlib archives for macOS linker compatibility
RLIB_DIR="$1"
if [ -d "$RLIB_DIR" ]; then
    for rlib in "$RLIB_DIR"/*.rlib; do
        [ -f "$rlib" ] && ar d "$rlib" rust.metadata.bin 2>/dev/null || true
    done
fi
