rust/compiler/rustc_interface/src
Jubilee 41bc5d7f73
Rollup merge of #142089 - bjorn3:sysroot_handling_cleanup3, r=petrochenkov
Replace all uses of sysroot_candidates with get_or_default_sysroot

Before this change we had two different ways to attempt to locate the sysroot which are inconsistently used:
* `get_or_default_sysroot` which tries to locate based on the 0th cli argument and if that doesn't work falls back to locating it using the librustc_driver.so location and returns a single path.,
* `sysroot_candidates` which takes the former and additionally does another attempt at locating using `librustc_driver.so` except without linux multiarch handling and then returns both paths.,

The latter was originally introduced to be able to locate the codegen backend back when cg_llvm was dynamically linked even for a custom driver when the `--sysroot` passed in does not contain a copy of cg_llvm. Back then `get_or_default_sysroot` did not attempt to locate the sysroot based on the location of librustc_driver.so yet. Because that is now done, the only case where removing `sysroot_candidates` can break things is if you have a custom driver inside what looks like a sysroot including the `lib/rustlib` directory, but which is missing some parts of the full sysroot like eg rust-lld.

Follow up to https://github.com/rust-lang/rust/pull/138404
2025-06-08 17:17:54 -07:00
..
callbacks.rs Represent diagnostic side effects as dep nodes 2025-03-14 16:01:58 +01:00
errors.rs Remove attribute #[rustc_error] 2025-03-30 01:32:21 +03:00
interface.rs Fix review comments 2025-06-06 14:20:48 +00:00
lib.rs update cfg(bootstrap) 2025-05-12 15:33:37 +02:00
limits.rs Move methods from Map to TyCtxt, part 2. 2025-02-18 10:17:44 +11:00
passes.rs Auto merge of #141950 - oli-obk:big-body-owner-loop, r=compiler-errors 2025-06-07 20:06:23 +00:00
proc_macro_decls.rs Move methods from Map to TyCtxt, part 4. 2025-03-12 08:55:37 +11:00
queries.rs Remove the parse query 2024-12-14 14:24:49 +00:00
tests.rs Optionally don't steal the THIR 2025-06-01 19:14:13 +02:00
util.rs Fix review comments 2025-06-06 14:20:48 +00:00