This is an archive of the discontinued LLVM Phabricator instance.

Ignore --export-dynamic if --relocatable is given
ClosedPublic

Authored by ruiu on Oct 3 2019, 8:56 PM.

Details

Summary

The combination of the two flags doesn't make sense, and other linkers
seem to just ignore --export-dynamic if --relocatable is given. This
patch makes lld compatible with that behavior.

Fixes https://bugs.llvm.org/show_bug.cgi?id=43552

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu created this revision.Oct 3 2019, 8:56 PM
Herald added a project: Restricted Project. · View Herald Transcript
ruiu updated this revision to Diff 223793.Oct 8 2019, 12:24 AM
  • report error instead of ignoring -export-dynamic
grimar accepted this revision.Oct 8 2019, 12:48 AM

LGTM with 2 nits.

lld/test/ELF/driver.test
54 ↗(On Diff #223793)

Remove this duplication.

77 ↗(On Diff #223793)

-o %tfail -> -o /dev/null

This revision is now accepted and ready to land.Oct 8 2019, 12:48 AM
ruiu marked 2 inline comments as done.Oct 8 2019, 1:02 AM
ruiu added inline comments.
lld/test/ELF/driver.test
77 ↗(On Diff #223793)

I'll do that in a follow-up patch to replace all occurrences of %tfail in this file in one shot.

This revision was automatically updated to reflect the committed changes.