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
This commit is contained in:
Jubilee 2024-10-31 17:50:43 -07:00 committed by GitHub
commit a25041fd77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.