This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Add "warning", "error" and "fatal error" prefixes to linker messages
ClosedPublic

Authored by evgeny777 on Oct 18 2016, 7:51 AM.

Details

Summary

The primary goal is integration with MS visual studio. Also this makes possible distinguishing warnings from errors when lld is invoked from command line.

Diff Detail

Event Timeline

evgeny777 updated this revision to Diff 75002.Oct 18 2016, 7:51 AM
evgeny777 retitled this revision from to [ELF] Add "warning", "error" and "fatal error" prefixes to linker messages.
evgeny777 updated this object.
evgeny777 added reviewers: ruiu, rafael.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.
evgeny777 added subscribers: ikudrin, grimar, llvm-commits.
ruiu edited edge metadata.Oct 18 2016, 11:05 AM

Do we have to distinguish "fatal error" from "error"? I think it can just be "error" and "warning".

AFAIK gold reports both "fatal error" and error as well. Also "fatal error" is different from "error" in lld, because it causes immediate exit.
But I don't mind having only warning and error for now.

ruiu accepted this revision.Oct 18 2016, 11:20 AM
ruiu edited edge metadata.

I'm a bit worried that showing both "error" and "fatal error" might confuse users. They are not different from the users' point of view. "Fatal error" will immediately exit, but "error" will also eventually exit with a failure code. Let's show "error:" for fatal. With that, LGTM.

This revision is now accepted and ready to land.Oct 18 2016, 11:20 AM
This revision was automatically updated to reflect the committed changes.