diff options
| author | Mads Marquart <mads@marquart.dk> | 2025-08-11 22:29:00 +0200 |
|---|---|---|
| committer | Mads Marquart <mads@marquart.dk> | 2025-08-11 22:29:00 +0200 |
| commit | 1cc44bfd22f4db5bcf3921f4a8b64df4e9cf4124 (patch) | |
| tree | 33bd58076ecd2455726ce1ab942336e57fd1faa6 /src | |
| parent | 1dc37df51476b568b1fa94db14a7669656989862 (diff) | |
| download | rust-1cc44bfd22f4db5bcf3921f4a8b64df4e9cf4124.tar.gz rust-1cc44bfd22f4db5bcf3921f4a8b64df4e9cf4124.zip | |
Pass Apple SDK root to compiler driver via SDKROOT env var
This is more in-line with what Apple's tooling expects, and allows us to better support custom compiler drivers (such as certain Homebrew and Nixpkgs compilers) that prefer their own `-isysroot` flag. Effectively, we now invoke the compiler driver as-if it was invoked as `xcrun -sdk $sdk_name $tool`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/unstable-book/src/compiler-environment-variables/SDKROOT.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/unstable-book/src/compiler-environment-variables/SDKROOT.md b/src/doc/unstable-book/src/compiler-environment-variables/SDKROOT.md index be9ed02f54d..6d371ae289f 100644 --- a/src/doc/unstable-book/src/compiler-environment-variables/SDKROOT.md +++ b/src/doc/unstable-book/src/compiler-environment-variables/SDKROOT.md @@ -1,6 +1,6 @@ # `SDKROOT` This environment variable is used on Apple targets. -It is passed through to the linker (currently either as `-isysroot` or `-syslibroot`). +It is passed through to the linker (currently either directly or via the `-syslibroot` flag). Note that this variable is not always respected. When the SDKROOT is clearly wrong (e.g. when the platform of the SDK does not match the `--target` used by rustc), this is ignored and rustc does its own detection. |
