1
Fork 0
rust/compiler/rustc_codegen_ssa/src
bors edc4dc337b Auto merge of #128370 - petrochenkov:libsearch, r=bjorn3
linker: Pass fewer search directories to the linker

- The logic for passing `-L` directories to the linker is consolidated in a single function, so the search priorities are immediately clear.
- Only `-Lnative=`, `-Lframework=` `-Lall=` directories are passed to linker, but not `-Lcrate=` and others. That's because only native libraries are looked up by name by linker, all Rust crates are passed using full paths, and their directories should not interfere with linker search paths.
- The main sysroot library directory shouldn't generally be passed because it shouldn't contain native libraries, except for one case which is now marked with a FIXME.
- This also helps with https://github.com/rust-lang/rust/pull/123436, in which we need to walk the same list of directories manually.

The next step is to migrate `find_native_static_library` to exactly the same set and order of search directories (which may be a bit annoying for the `iOSSupport` directories https://github.com/rust-lang/rust/pull/121430#issuecomment-2256372341).
2024-08-03 15:29:52 +00:00
..
back Fix linking to sanitizers on Apple targets 2024-08-03 14:20:18 +03:00
debuginfo Reformat use declarations. 2024-07-29 08:26:52 +10:00
mir Reformat use declarations. 2024-07-29 08:26:52 +10:00
traits Reformat use declarations. 2024-07-29 08:26:52 +10:00
assert_module_sources.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
base.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
codegen_attrs.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
common.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
errors.rs Rollup merge of #127830 - tgross35:archive-failure-message, r=BoxyUwU 2024-07-31 15:36:30 +02:00
lib.rs Reformat use declarations. 2024-07-29 08:26:52 +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 Add the sha512, sm3 and sm4 target features 2024-08-02 02:29:15 +05:30