rust/compiler/rustc_codegen_ssa/src/back
Trevor Gross 42cd3c60df
Rollup merge of #129418 - petrochenkov:libsearch2, r=jieyouxu
rustc: Simplify getting sysroot library directory

It was very non-obvious that `sess.target_tlib_path`, `make_target_lib_path(...)`, and `sess.target_filesearch(...).search_paths()` result in the same sysroot library directory paths.
They are however, indeed the same, because `sess.target_tlib_path` is initialized to `make_target_lib_path(...)` on `Session` creation, and they are used interchangeably.

There are still some redundant calls to `make_target_lib_path` and other inconsistent ways to obtain sysroot directories, but fixing that requires some behavior changes, while this PR is a pure refactoring.
Some places in the compiler even disagree on the number of sysroots - 1 (explicit `--sysroot` *or* default sysroot), 2 (explicit `--sysroot` *and* default sysroot), or an unclear number of `sysroot_candidates` every of which is considered.
The logic currently using `sess.target_tlib_path` or equivalents assumes one sysroot.
2024-08-27 01:46:51 -05:00
..
rpath Reformat use declarations. 2024-07-29 08:26:52 +10:00
archive.rs Fix elided_named_lifetimes in code 2024-08-24 19:21:32 +03:00
command.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
link.rs Rollup merge of #129418 - petrochenkov:libsearch2, r=jieyouxu 2024-08-27 01:46:51 -05:00
linker.rs Simplify some redundant field names 2024-08-21 01:31:42 -04:00
lto.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
metadata.rs rustc_codegen_ssa: Set architecture for object crate for 32-bit SPARC 2024-08-07 09:56:28 +02:00
mod.rs Use the object crate for metadata reading 2021-05-07 18:48:58 +02:00
rpath.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
symbol_export.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
write.rs Add warn(unreachable_pub) to rustc_codegen_ssa. 2024-08-16 08:46:57 +10:00