Skip to content
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

help users set a macos sdk deployment target #788

Open
Gankra opened this issue Feb 12, 2024 · 0 comments
Open

help users set a macos sdk deployment target #788

Gankra opened this issue Feb 12, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@Gankra
Copy link
Contributor

Gankra commented Feb 12, 2024

Even the newest macos sdks all have support for much older "deployment targets" (you can tell the 14 sdk to build for 10.12, for instance). This is governed by MACOSX_DEPLOYMENT_TARGET env var. At best, cargo-dist should default to automatically setting this to a reasonable value. At worst we should have docs telling people to set this in their cargo-dist env-vars (and we should test it works! i have a macos 11 intel macbook to test with).

Doing this would unblock us unabashedly using the apple silicon runners, which would be a huge win.

A former apple compiler engineer who now does a lot of rust dev has informed me that this env-var has a ton of confusing discussion, and that the value rustc "defaults" to is just for the stdlib/itself, seemingly rust binaries you build default to deployment_target == sdk_version which is of course a portability nightmare.

For reference, rustc defaults to 10.12 for itself (rustc --target x86_64-apple-darwin --print deployment-target), which is super generous.

See also this (confusing) issue about how cargo doesn't set the env-var for build scripts, which makes cdeps very sad: rust-lang/cargo#13115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant