Skip to content

Halide’s hard-coded Mach-O minimum OS versions for AoT output look unnecessarily high #8914

@bc-lee

Description

@bc-lee

LC_BUILD_VERSION is a Mach-O load command that records the target platform and a minimum OS version (and tool versions). Tools like Apple’s linker use it to understand what platform an object/library was built for.

Recent versions of Apple’s linker are more strict about missing platform metadata and can warn when object files or static libraries don’t include the relevant “platform load command”, e.g.:

ld: warning: no platform load command found in '...', assuming: iOS-simulator

This warning has been widely observed since Xcode 15’s linker became more pedantic about this metadata.

Halide addressed this in PR #8323 by ensuring the LLVM target triple includes a minimum OS version when emitting Mach-O objects. In that change, Halide special-cased Intel macOS (x86_64) to use macOS 11.0, with a comment explaining it was “one version prior to the oldest version still supported by Apple” at the time (June 2024).

Later, PR #8546 updated these constraints. It sets:

  • macOS x86_64 → 12.0
  • iOS (device) → 17.0

This change appears in the Halide v21.0.0 release notes.

Issue

These values are hard-coded in Halide, and downstream users don’t have an easy way to choose a different deployment target for AoT outputs.

For reference, Apple’s Xcode support matrix (as of 2026-01-20) shows Xcode 26.2(which is latest) supports deployment targets down to:

Given that, requiring macOS 12.0 and especially iOS 17.0 for Halide AoT-generated objects/libraries seems unnecessarily restrictive. I don’t believe Halide’s AoT outputs inherently require such a high minimum OS version in order to function.

Proposal

For now, I’d suggest lowering Halide’s hard-coded minimums to match Xcode’s supported minimum deployment targets:

  • macOS 11.0
  • iOS 15.0

Longer term, a better solution would be to make the minimum deployment target configurable (e.g., via a CLI flag analogous to -mmacosx-version-min / -miphoneos-version-min, or a Halide Target feature), but as a small/safe step, lowering the constants would help many downstream users.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions