Skip to content

Commit

Permalink
Rollup merge of #132417 - madsmtm:document-darwin-macos-difference, r…
Browse files Browse the repository at this point in the history
…=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
  • Loading branch information
workingjubilee authored Nov 1, 2024
2 parents c57b351 + 40f4b21 commit a25041f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/doc/rustc/src/platform-support/apple-darwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit a25041f

Please sign in to comment.