-
Notifications
You must be signed in to change notification settings - Fork 13.3k
not possible to specify ios/macos versions requirements when cross-compiling for ios #53808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
So, is there a way to pass these arguments yet? I tried setting
When I set
But there's still the option |
Any updates about this issue? I'm using the env variable |
I'm also curious about this issue. Is there any way to specify minimum ios deployment target version? |
theoretically rust/compiler/rustc_target/src/spec/apple_base.rs Lines 292 to 295 in 271dcc1
|
Triage: I believe the original issue was about setting both Concretely, the following now works for running build scripts locally with a deployment target of macOS 11, and building the binary with a deployment target of iOS 14: MACOSX_DEPLOYMENT_TARGET=11.0 IPHONEOS_DEPLOYMENT_TARGET=14.0 cargo build --target aarch64-apple-ios-sim |
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 setmmacos-version-min
for the build.rs scripts (yay) and the cross compiled code (boo - fails to build). The story is the reverse withIPHONEOS_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.
The text was updated successfully, but these errors were encountered: