This is an archive of the discontinued LLVM Phabricator instance.

Implement the --exclude-libs option.
ClosedPublic

Authored by ruiu on Jun 20 2017, 2:45 PM.

Details

Summary

The --exclude-libs option is not a popular option, but at least some
programs in Android depend on it, so it's worth to support it.

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu created this revision.Jun 20 2017, 2:45 PM
ruiu edited the summary of this revision. (Show Details)Jun 20 2017, 2:55 PM
grimar edited edge metadata.Jun 21 2017, 5:52 AM

Yeah, it is really much simpler. I like this approach. Minor nits.

lld/ELF/Driver.cpp
926 ↗(On Diff #103271)

I wonder, does it make sence to report a warning if "ALL" is not along in a list or
used mixed with other names ? That may prevent a mistake, probably.

lld/test/ELF/exclude-libs.s
30 ↗(On Diff #103271)

You do not need main, because linking DSO.

call fn@PLT

Is enough here.

grimar accepted this revision.Jun 21 2017, 5:54 AM

So LGTM.

This revision is now accepted and ready to land.Jun 21 2017, 5:54 AM
ruiu added inline comments.Jun 21 2017, 6:47 AM
lld/ELF/Driver.cpp
926 ↗(On Diff #103271)

I could, but I don't see a need to do that, so I'll keep it as simple as possible.

This revision was automatically updated to reflect the committed changes.