This is an archive of the discontinued LLVM Phabricator instance.

lld: ignore the `-search_paths_first` option on MachO
ClosedPublic

Authored by compnerd on Jun 2 2020, 4:11 PM.

Details

Reviewers
smeenai
int3
Summary

ld64 provides the -search_path_firsts which will search each path in
the library search path order for both lib[name].dylib, lib[name].a
before moving on (searching all paths for the dylib and then falling
back to the static library if a shared library was not found).

This option has been the default for a long time, but the command line
flag still exists. Ignore it for compatibility.

Diff Detail

Event Timeline

compnerd created this revision.Jun 2 2020, 4:11 PM
Herald added a project: Restricted Project. ยท View Herald TranscriptJun 2 2020, 4:11 PM
smeenai accepted this revision.Jun 2 2020, 4:58 PM
smeenai added a subscriber: gkm.

@gkm is working on larger-scale ld64 option handling in D80582, but this looks good to go in in the meantime.

This revision is now accepted and ready to land.Jun 2 2020, 4:58 PM

Although, fun fact, our handling for -l doesn't search for static libraries at all right now :D That's definitely something to fix.

compnerd closed this revision.Jun 3 2020, 8:38 AM

rG37d93b528c1

As to the fun fact: ๐Ÿ˜’ ... thanks for pointing it out though, definitely something to track (which I guess raises the question of, is there any tracking for all the items that are still to do?)

int3 added a comment.Jun 3 2020, 11:37 AM

is there any tracking for all the items that are still to do?

Just in the form of TODO comments (there isn't one for the abovementioned though)