Skip to content

Commit 2b3796a

Browse files
committed
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 rust-lang/rust#126094 (comment)). 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 rust-lang/rust#123436).
2 parents bacc593 + d0d1f72 commit 2b3796a

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)