rust/compiler/rustc_codegen_ssa/src
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
..
back Rollup merge of #129418 - petrochenkov:libsearch2, r=jieyouxu 2024-08-27 01:46:51 -05:00
debuginfo Auto merge of #128037 - beetrees:repr128-c-style-use-natvis, r=michaelwoerister 2024-08-15 09:17:24 +00:00
mir Rollup merge of #126013 - nnethercote:unreachable_pub, r=Urgau 2024-08-27 00:41:57 +02:00
traits Auto merge of #128861 - khuey:mir-inlining-parameters-debuginfo, r=wesleywiser 2024-08-15 11:42:15 +00:00
assert_module_sources.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
base.rs Rename struct_tail_erasing_lifetimes to struct_tail_for_codegen 2024-08-08 12:15:16 -04:00
codegen_attrs.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
common.rs Rollup merge of #128206 - bjorn3:import_lib_writing_refactor, r=jieyouxu 2024-08-07 15:59:35 +02:00
errors.rs Always use ar_archive_writer for import libs 2024-08-17 19:10:46 +00:00
lib.rs Add warn(unreachable_pub) to rustc_codegen_ssa. 2024-08-16 08:46:57 +10:00
meth.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
mono_item.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
size_of_val.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
target_features.rs Disallow enabling features without their implied features 2024-08-07 00:45:00 -04:00