1
Fork 0

Rollup merge of #124772 - madsmtm:apple-platform-support-docs, r=oli-obk

Refactor documentation for Apple targets

Refactor the documentation for Apple targets in `rustc`'s platform support page to make it clear what the supported OS version is and which environment variables are being read (`*_DEPLOYMENT_TARGET` and `SDKROOT`). This fixes https://github.com/rust-lang/rust/issues/124215.

Note that I've expanded the `aarch64-apple-ios-sim` maintainers `@badboy` and `@deg4uss3r` to include being maintainer of all `*-apple-ios-*` targets. If you do not wish to be so, please state that, then I'll explicitly note that in the docs.

Additionally, I've added myself as co-maintainer of most of these targets.

r? `@thomcc`

I think the documentation you've previously written on tvOS is great, have mostly modified it to have a more consistent formatting with the rest of the Apple target.

I recognize that there's quite a few changes here, feel free to ask about any of them!

---

CC `@simlay` `@Nilstrieb`

`@rustbot` label O-apple
This commit is contained in:
Matthias Krüger 2024-05-21 12:47:04 +02:00 committed by GitHub
commit 4a4883bfb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 376 additions and 177 deletions

View file

@ -272,6 +272,7 @@ fn macos_default_deployment_target(arch: Arch) -> (u32, u32) {
fn macos_deployment_target(arch: Arch) -> (u32, u32) {
// If you are looking for the default deployment target, prefer `rustc --print deployment-target`.
// Note: If bumping this version, remember to update it in the rustc/platform-support docs.
from_set_deployment_target("MACOSX_DEPLOYMENT_TARGET")
.unwrap_or_else(|| macos_default_deployment_target(arch))
}
@ -320,6 +321,7 @@ fn link_env_remove(os: &'static str) -> StaticCow<[StaticCow<str>]> {
fn ios_deployment_target(arch: Arch, abi: &str) -> (u32, u32) {
// If you are looking for the default deployment target, prefer `rustc --print deployment-target`.
// Note: If bumping this version, remember to update it in the rustc/platform-support docs.
let (major, minor) = match (arch, abi) {
(Arm64e, _) => (14, 0),
// Mac Catalyst defaults to 13.1 in Clang.
@ -352,6 +354,7 @@ pub fn ios_sim_llvm_target(arch: Arch) -> String {
fn tvos_deployment_target() -> (u32, u32) {
// If you are looking for the default deployment target, prefer `rustc --print deployment-target`.
// Note: If bumping this version, remember to update it in the rustc platform-support docs.
from_set_deployment_target("TVOS_DEPLOYMENT_TARGET").unwrap_or((10, 0))
}
@ -367,6 +370,7 @@ pub fn tvos_sim_llvm_target(arch: Arch) -> String {
fn watchos_deployment_target() -> (u32, u32) {
// If you are looking for the default deployment target, prefer `rustc --print deployment-target`.
// Note: If bumping this version, remember to update it in the rustc platform-support docs.
from_set_deployment_target("WATCHOS_DEPLOYMENT_TARGET").unwrap_or((5, 0))
}
@ -382,6 +386,7 @@ pub fn watchos_sim_llvm_target(arch: Arch) -> String {
fn visionos_deployment_target() -> (u32, u32) {
// If you are looking for the default deployment target, prefer `rustc --print deployment-target`.
// Note: If bumping this version, remember to update it in the rustc platform-support docs.
from_set_deployment_target("XROS_DEPLOYMENT_TARGET").unwrap_or((1, 0))
}