Skip to content

Commit dffb0db

Browse files
committed
Document how the SDK is found if SDKROOT is not set
I've intentionally used slightly vague language ("roughly"), as we don't want to guarantee the exact invocation of `xcrun`, just hint that it's close to that.
1 parent 713becd commit dffb0db

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

Diff for: src/doc/rustc/src/platform-support/apple-darwin.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,5 @@ the `-mmacosx-version-min=...`, `-miphoneos-version-min=...` or similar flags
7070
to disambiguate.
7171

7272
The path to the SDK can be passed to `rustc` using the common `SDKROOT`
73-
environment variable.
73+
environment variable, or will be inferred when compiling on host macOS using
74+
roughly the same logic as `xcrun --sdk macosx --show-sdk-path`.

Diff for: src/doc/rustc/src/platform-support/apple-ios-macabi.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ These targets are cross-compiled, and require the corresponding macOS SDK
2020
iOS-specific headers, as provided by Xcode 11 or higher.
2121

2222
The path to the SDK can be passed to `rustc` using the common `SDKROOT`
23-
environment variable.
23+
environment variable, or will be inferred when compiling on host macOS using
24+
roughly the same logic as `xcrun --sdk macosx --show-sdk-path`.
2425

2526
### OS version
2627

Diff for: src/doc/rustc/src/platform-support/apple-ios.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ These targets are cross-compiled, and require the corresponding iOS SDK
2626
ARM64 targets, Xcode 12 or higher is required.
2727

2828
The path to the SDK can be passed to `rustc` using the common `SDKROOT`
29-
environment variable.
29+
environment variable, or will be inferred when compiling on host macOS using
30+
roughly the same logic as `xcrun --sdk iphoneos --show-sdk-path`.
3031

3132
### OS version
3233

Diff for: src/doc/rustc/src/platform-support/apple-tvos.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ These targets are cross-compiled, and require the corresponding tvOS SDK
2020
ARM64 targets, Xcode 12 or higher is required.
2121

2222
The path to the SDK can be passed to `rustc` using the common `SDKROOT`
23-
environment variable.
23+
environment variable, or will be inferred when compiling on host macOS using
24+
roughly the same logic as `xcrun --sdk appletvos --show-sdk-path`.
2425

2526
### OS version
2627

Diff for: src/doc/rustc/src/platform-support/apple-visionos.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ These targets are cross-compiled, and require the corresponding visionOS SDK
1818
(`XROS.sdk` or `XRSimulator.sdk`), as provided by Xcode 15 or newer.
1919

2020
The path to the SDK can be passed to `rustc` using the common `SDKROOT`
21-
environment variable.
21+
environment variable, or will be inferred when compiling on host macOS using
22+
roughly the same logic as `xcrun --sdk xros --show-sdk-path`.
2223

2324
### OS version
2425

Diff for: src/doc/rustc/src/platform-support/apple-watchos.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ These targets are cross-compiled, and require the corresponding watchOS SDK
2424
ARM64 targets, Xcode 12 or higher is required.
2525

2626
The path to the SDK can be passed to `rustc` using the common `SDKROOT`
27-
environment variable.
27+
environment variable, or will be inferred when compiling on host macOS using
28+
roughly the same logic as `xcrun --sdk watchos --show-sdk-path`.
2829

2930
### OS version
3031

0 commit comments

Comments
 (0)