[PATCH] D49189: Omit path to lld binary from lld's error and warning diagnostics.

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 11 11:39:01 PDT 2018


thakis added a comment.

Thanks for taking a look!

> I think we should at least include "ld.lld: " part in the error message, because without that, it is sometimes hard to identify what command is emitting an error in a long build log.

In what cases? clang doesn't prepend its errors with "clang:" (except for driver-level diags) either. For failed build steps, most build tools output the failing build step above the error so it's clear from context where the error comes from.

I see how this is is useful in the abstract, but I can't think of concrete examples (it's well possible I'm just lacking imagination), so I thought not printing anything is the best approach: If there's some concrete case where it helps, we'll learn about it and can add something back, and if there isn't then we end up with easier to read output.  If we include some prefix and it's not needed, we'll always be stuck with it.

In https://reviews.llvm.org/D49189#1159020, @smeenai wrote:

> In https://reviews.llvm.org/D49189#1159019, @ruiu wrote:
>
> > I think we should at least include "ld.lld: " part in the error message, because without that, it is sometimes hard to identify what command is emitting an error in a long build log.
>
>
> +1 – it's useful to be able to immediately identify linker errors.
>
> Do you plan to do something similar for lld-link as well?


This patch here modifies lld-link's behavior as well.


https://reviews.llvm.org/D49189





More information about the llvm-commits mailing list