[PATCH] D87272: [lld] Buffer writes when composing a single diagnostic

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 9 16:56:43 PDT 2021


MaskRay added a comment.

In D87272#2991991 <https://reviews.llvm.org/D87272#2991991>, @dblaikie wrote:

> I still don't think this patch is appropriate, in part due to the colour diagnostic issue - coloured output can't, in general, be buffered (due to Windows having a stateful/API based colour changing, rather than ANSI based colour changing - at least in some cases)

`sys::Process::UseANSIEscapeCodes(true);` enables ANSCI escape codes for Windows.

> If people are getting pages and pages of errors they're ignoring/want to perform quickly - that seems like something that deserves a different solution: turning off the warnings they are ignoring.

This is separate: whether we need an option like `--warn-limit=N`.
Separate options turning off warnings seem less useful to me. There are some warnings which don't deserve an option (which would make things more complicate). Off-by-default options need the users to rerun the link to turn off it.

This patch addresses another problem: I have seen interleaved diagnostic (something like `msg_from_process_0 msg_from_process_1 msg_from_process_1` on one line) from either Clang or ld.lld from multiple processes.
This patch will avoid such issue.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87272/new/

https://reviews.llvm.org/D87272



More information about the llvm-commits mailing list