Skip to content

Commit

Permalink
Document the difference between Clang's -darwin and -macosx targets
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Oct 31, 2024
1 parent 20c909f commit 40f4b21
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 40f4b21

Please sign in to comment.