about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-10-31 17:50:43 -0700
committerGitHub <noreply@github.com>2024-10-31 17:50:43 -0700
commita25041fd7759bafbc8750075ef11b1bd40abb5dd (patch)
tree28c073213a2c97721f245397c460c3af916e0957
parentc57b351d38102ca83190deb03cf956a2fa488ff2 (diff)
parent40f4b216ebe79541c0199fe04b4c65ff729cef18 (diff)
downloadrust-a25041fd7759bafbc8750075ef11b1bd40abb5dd.tar.gz
rust-a25041fd7759bafbc8750075ef11b1bd40abb5dd.zip
Rollup merge of #132417 - madsmtm:document-darwin-macos-difference, r=jieyouxu
macOS: Document the difference between Clang's `-darwin` and `-macosx` targets

`rustc`'s `*-apple-darwin` targets are badly named (they should've been called `*-apple-macos`), and this causes confusion wrt. the similarly named but somewhat incompatible Clang targets.

So let's document the difference to at least make things a _little_ easier on our users.

``@rustbot`` label O-macos  A-docs
-rw-r--r--src/doc/rustc/src/platform-support/apple-darwin.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/doc/rustc/src/platform-support/apple-darwin.md b/src/doc/rustc/src/platform-support/apple-darwin.md
index c3a7b81f411..17ea225805b 100644
--- a/src/doc/rustc/src/platform-support/apple-darwin.md
+++ b/src/doc/rustc/src/platform-support/apple-darwin.md
@@ -52,5 +52,10 @@ Cross-compilation of these targets are supported using Clang, but may require
 Xcode or the macOS SDK (`MacOSX.sdk`) to be available to compile C code and
 to link.
 
+The Clang target is suffixed with `-macosx`. Clang's `-darwin` target refers
+to Darwin platforms in general (macOS/iOS/tvOS/watchOS/visionOS), and requires
+the `-mmacosx-version-min=...`, `-miphoneos-version-min=...` or similar flags
+to disambiguate.
+
 The path to the SDK can be passed to `rustc` using the common `SDKROOT`
 environment variable.