rust/compiler/rustc_codegen_ssa
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
..
src Auto merge of #128370 - petrochenkov:libsearch, r=bjorn3 2024-08-03 15:29:52 +00:00
Cargo.toml dedup object 2024-07-28 17:21:07 +03:00
messages.ftl When an archive fails to build, print the path 2024-07-16 15:44:54 -05:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.