Skip to content

not possible to specify ios/macos versions requirements when cross-compiling for ios #53808

Closed
@mtak-

Description

@mtak-

I want some way to pass these arguments through cargo while doing a cross compile to iOS:

  • miphoneos-version-min
  • mios-simulator-version-min
  • mmacos-version-min

I don't see a way to do accomplish this without breaking either the build.rs scripts or the actual cross-compiled code.

Setting the environment variable MACOSX_DEPLOYMENT_TARGET will set mmacos-version-min for the build.rs scripts (yay) and the cross compiled code (boo - fails to build). The story is the reverse with IPHONEOS_DEPLOYMENT_TARGET - breaks build scripts, and works for the cross-compiled code.

Certain libraries like metal-rs have min iOS version requirements greater than iOS 7.0 which appears to be the default, so it'd be pretty handy if there was a way to tweak these flags.

I'm thinking there might be a way using RUSTC_WRAPPER or some sort of .cargo/config, but I haven't fully investigated it yet.

#29664 seems a little related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.O-iosOperating system: iOSO-macosOperating system: macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions