From 40f4b216ebe79541c0199fe04b4c65ff729cef18 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 29 Sep 2024 17:20:59 +0200 Subject: [PATCH] Document the difference between Clang's `-darwin` and `-macosx` targets --- src/doc/rustc/src/platform-support/apple-darwin.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/doc/rustc/src/platform-support/apple-darwin.md b/src/doc/rustc/src/platform-support/apple-darwin.md index c3a7b81f411e8..17ea225805b5c 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.