rust/src
Jacob Pratt 0b40e6e2cf
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``
2025-03-27 21:41:48 -04:00
..
bootstrap Rollup merge of #139016 - Kobzol:post-merge-analysis-durations, r=marcoieni 2025-03-27 13:11:21 -04:00
build_helper Add CI metadata to bootstrap metrics 2025-03-27 17:03:08 +01:00
ci Add CI metadata to bootstrap metrics 2025-03-27 17:03:08 +01:00
doc Rollup merge of #139010 - madsmtm:parse-xcrun-better, r=wesleywiser 2025-03-27 21:41:48 -04:00
etc Rollup merge of #138606 - heiseish:131365-extended, r=Mark-Simulacrum 2025-03-23 20:44:11 -04:00
gcc@13cc824322 Update GCC submodule 2025-03-19 15:35:47 +01:00
librustdoc Auto merge of #139023 - jhpratt:rollup-4ou6ei4, r=jhpratt 2025-03-27 18:33:31 +00:00
llvm-project@acaea3d2bb Update to LLVM 20.1.1 2025-03-19 10:36:30 +01:00
rustc-std-workspace update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustdoc-json-types rustdoc: Use own logic to print #[repr(..)] attributes in JSON output. 2025-03-22 18:47:12 +00:00
tools Rollup merge of #138999 - jieyouxu:spellout-pass-mode, r=wesleywiser 2025-03-27 13:11:19 -04:00
README.md
stage0 bump stage0 2025-02-18 08:51:01 -08:00
version Bump to version 1.87.0 2025-02-14 09:55:45 -08:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.