rust/compiler/rustc_codegen_ssa
bors 1086affd98 Auto merge of #126094 - petrochenkov:libsearch, r=michaelwoerister
linker: Link dylib crates by path

Linkers seem to support linking dynamic libraries by path.
Not sure why the previous scheme with splitting the path into a directory (passed with `-L`) and a name (passed with `-l`) was used (upd: likely due to https://github.com/rust-lang/rust/pull/126094#issuecomment-2155063414).

When we split a library path `some/dir/libfoo.so` into `-L some/dir` and `-l foo` we add `some/dir` to search directories for *all* libraries looked up by the linker, not just `foo`, and `foo` is also looked up in *all* search directories not just `some/dir`.
Technically we may find some unintended libraries this way.
Therefore linking dylibs via a full path is both simpler and more reliable.

It also makes the set of search directories more easily reproducible when we need to lookup some native library manually (like in https://github.com/rust-lang/rust/pull/123436).
2024-07-03 14:15:31 +00:00
..
src Auto merge of #126094 - petrochenkov:libsearch, r=michaelwoerister 2024-07-03 14:15:31 +00:00
Cargo.toml Make SSA aggregates without needing an alloca 2024-05-08 20:38:04 -07:00
messages.ftl coverage: Tighten validation of #[coverage(off)] and #[coverage(on)] 2024-06-24 20:15:01 +10: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.