Skip to content

Commit

Permalink
Rollup merge of rust-lang#132417 - madsmtm:document-darwin-macos-diff…
Browse files Browse the repository at this point in the history
…erence, 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
  • Loading branch information
matthiaskrgr authored Oct 31, 2024
2 parents 3329559 + 40f4b21 commit f7c3fa2
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 f7c3fa2

Please sign in to comment.