This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Fall back to raw path if we don't find anything under syslibroot
ClosedPublic

Authored by int3 on Aug 14 2020, 12:45 PM.

Details

Summary

This matches ld64's behavior

Diff Detail

Event Timeline

int3 created this revision.Aug 14 2020, 12:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2020, 12:45 PM
int3 requested review of this revision.Aug 14 2020, 12:45 PM
smeenai accepted this revision.Aug 14 2020, 2:09 PM
smeenai added a subscriber: smeenai.

Can you also add a test for the standard paths not being searched without a syslibroot prefix? As in, if you pass -syslibroot and there's e.g. no /usr/lib under it, we shouldn't add the standard /usr/lib to the search path.

This revision is now accepted and ready to land.Aug 14 2020, 2:09 PM
int3 added inline comments.Aug 14 2020, 4:09 PM
lld/test/MachO/syslibroot.test
3–6

As in, if you pass -syslibroot and there's e.g. no /usr/lib under it, we shouldn't add the standard /usr/lib to the search path.

This test covers that already :)

smeenai added inline comments.Aug 14 2020, 4:13 PM
lld/test/MachO/syslibroot.test
3–6

Indeed it does! Ignore me :)