This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Add .tbd support for frameworks
ClosedPublic

Authored by int3 on Aug 3 2020, 1:23 PM.

Details

Reviewers
compnerd
smeenai
Group Reviewers
Restricted Project
Commits
rG25367dfefb7b: [lld-macho] Add .tbd support for frameworks
Summary

Required for e.g. linking iOS apps since they don't have a platform-native
SDK

Diff Detail

Event Timeline

int3 created this revision.Aug 3 2020, 1:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2020, 1:23 PM
int3 requested review of this revision.Aug 3 2020, 1:23 PM
int3 edited the summary of this revision. (Show Details)Aug 3 2020, 1:24 PM
int3 edited the summary of this revision. (Show Details)
int3 updated this revision to Diff 282722.Aug 3 2020, 2:04 PM

update

int3 added a reviewer: Restricted Project.Aug 3 2020, 2:04 PM
compnerd accepted this revision.Aug 5 2020, 8:51 AM
compnerd added a subscriber: compnerd.
compnerd added inline comments.
lld/MachO/Driver.cpp
87

The name makes it seem like it will match base.*. What do you think of findWithAllowedExtensions?

This revision is now accepted and ready to land.Aug 5 2020, 8:51 AM
int3 added inline comments.Aug 5 2020, 9:25 AM
lld/MachO/Driver.cpp
87

findWithExtensions? Avoids the misleading Any and is shorter :)

int3 updated this revision to Diff 283281.Aug 5 2020, 9:51 AM

rename

smeenai accepted this revision.Aug 5 2020, 6:22 PM
smeenai added a subscriber: smeenai.

LGTM

lld/MachO/Driver.cpp
114–115

I think this comment is out of place now?

122

Does ld64 also not check for tbds if there's a suffix?

int3 updated this revision to Diff 283490.Aug 5 2020, 11:14 PM
int3 marked an inline comment as done.

remove comment

lld/MachO/Driver.cpp
122

It just checks for the non-suffixed name when considering tbds. I debated on whether I should add a test for this behavior, since it's not clear to me that ld64 intended for it to work this way. The test might just be codifying an irrelevant implementation detail...

smeenai added inline comments.Aug 6 2020, 7:03 PM
lld/MachO/Driver.cpp
122

Sure, makes sense.

This revision was landed with ongoing or failed builds.Aug 7 2020, 11:05 AM
This revision was automatically updated to reflect the committed changes.