This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Implement --warn-once.
AbandonedPublic

Authored by grimar on Jul 24 2017, 6:24 AM.

Details

Reviewers
ruiu
rafael
Summary

--warn-once is a option supported by ld.bfd which is:

--warn-once
Only warn once for each undefined symbol, rather than once per module which refers to it.

Reporting undefined symbol only once seems useful feature, that is why I implemented it.
(FWIW gold does not seem to support it).

Diff Detail

Event Timeline

grimar created this revision.Jul 24 2017, 6:24 AM
ruiu edited edge metadata.Jul 24 2017, 7:35 AM

I'd ignore this option for now as I personally didn't find this option useful.

ruiu added a comment.Jul 25 2017, 11:34 AM

It might be a nice-to-have feature, but it seems like a feature creeping to me. Let's just ignore this option until someone comes to us and show a strong evidence that this is super-useful.

ruiu added a comment.Jul 25 2017, 11:39 AM

(By the way, I wouldn't do this, but even if we would do, I wouldn't take the approach that is implemented in this patch because I don't want to mess up the Symbol data structure for this feature as it is too much. I'd instead make a change to Error.cpp so that no messages are printed out more than once. But, again, I wouldn't do that.)

In D35797#820477, @ruiu wrote:

(By the way, I wouldn't do this, but even if we would do, I wouldn't take the approach that is implemented in this patch because I don't want to mess up the Symbol data structure for this feature as it is too much. I'd instead make a change to Error.cpp so that no messages are printed out more than once. But, again, I wouldn't do that.)

Ok, anyways thanks. I did not think about possibility to do a change to Error.cpp, it was interesting to think about.

grimar abandoned this revision.Jul 26 2017, 3:27 AM

r309096 ignores this option.