mirror of
https://github.com/kirbylink/mpv-natives
synced 2026-11-18 21:09:01 +01:00
The x86_64 slice cross-compiled Swift for the host architecture (arm64) because swiftc did not inherit clang's --target; the generated Application/AppHub objects therefore never landed in the x86_64 slice and the universal dylib failed to dlopen on Intel machines. mpv's swiftc invocation takes its own --target triple, which also carries the deployment version, so a single -Dswift-flags pins both the architecture and the min OS per slice. The C/ObjC deployment target is set in CFLAGS/CXXFLAGS/LDFLAGS so meson and ffmpeg (both read them from the environment) propagate it to every statically linked dependency; the linker takes the max of the objects it links, so omitting it anywhere would leave the dylib pinned to the runner SDK minimum. mpv gates its macOS feature flags on the SDK version, not the deployment target, so no features are lost. Co-Authored-By: Claude <noreply@anthropic.com>