about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/errors.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-03-27 21:41:48 -0400
committerGitHub <noreply@github.com>2025-03-27 21:41:48 -0400
commit0b40e6e2cf6c389d21976fe6ca0e61d3d2ecddc9 (patch)
tree9fbaa9721d5128cc5df85c9351c3bec2ec0d2507 /compiler/rustc_mir_transform/src/errors.rs
parent3e274bd1a537b17da4a0eb553d16649886200914 (diff)
parent89348e51e383a6300206e3356143fce812838921 (diff)
downloadrust-0b40e6e2cf6c389d21976fe6ca0e61d3d2ecddc9.tar.gz
rust-0b40e6e2cf6c389d21976fe6ca0e61d3d2ecddc9.zip
Rollup merge of #139010 - madsmtm:parse-xcrun-better, r=wesleywiser
Improve `xcrun` error handling

The compiler invokes `xcrun` on macOS when linking Apple targets, to find the Xcode SDK which contain all the necessary linker stubs. The error messages that `xcrun` outputs aren't always that great though, so this PR tries to improve that by providing extra context when an error occurs.

Fixes https://github.com/rust-lang/rust/issues/56829.
Fixes https://github.com/rust-lang/rust/issues/84534.
Part of https://github.com/rust-lang/rust/issues/129432.
See also the alternative https://github.com/rust-lang/rust/pull/131433.

Tested on:
- `x86_64-apple-darwin`, MacBook Pro running Mac OS X 10.12.6
    - With no tooling installed
    - With Xcode 9.2
    - With Xcode 9.2 Commandline Tools
- `aarch64-apple-darwin`, MacBook M2 Pro running macOS 14.7.4
    - With Xcode 13.4.1
    - With Xcode 16.2
    - Inside `nix-shell -p xcbuild` (nixpkgs' `xcrun` shim)
- `aarch64-apple-darwin`, VM running macOS 15.3.1
    - With no tooling installed
    - With Xcode 16.2 Commandline Tools

``@rustbot`` label O-apple
r? compiler
CC ``@BlackHoleFox`` ``@thomcc``
Diffstat (limited to 'compiler/rustc_mir_transform/src/errors.rs')
0 files changed, 0 insertions, 0 deletions