about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-08-03 15:29:52 +0000
committerbors <bors@rust-lang.org>2024-08-03 15:29:52 +0000
commitedc4dc337b28a389dbd87b3825d7929381edeb8f (patch)
tree5b6ed411873a550d286456738a968e9c29d40cf9 /compiler/rustc_parse/src
parent1f47624f9abad7974afe1c016a4e8b07f4254ee4 (diff)
parent1f873f9cf1e6307d1f0bee85f7a866f9531b8a98 (diff)
downloadrust-edc4dc337b28a389dbd87b3825d7929381edeb8f.tar.gz
rust-edc4dc337b28a389dbd87b3825d7929381edeb8f.zip
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).
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions