https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115970
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #58854|0 |1
is obsolete| |
--- Comment #5 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Created attachment 62396
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62396&action=edit
Updated WIP patch
The earlier patch was badly bit-rotted.
Here's an updated version, which happens to be on top of attachment 62395 for
bug 117815; only lightly tested, by:
- creating a unix domain socket
- running "SARIF_SOCKET=name-of-socket ./sarif-listener" in one terminal
- running "SARIF_SOCKET=name-of-socket ...gcc invocation..." in another
terminal
The patch is still very much a prototype. If the environment has SARIF_SOCKET
set to a path to a socket, then GCC diagnostics are emitted as JSON-RPC
notifications to the socket in a manner akin to that for "SARIF_OUTPUT_PIPE" in
P3358R0, albeit with Unix domain sockets (i.e. it sends a notification after
each diagnostic, rather than for the whole run). The patch also implements a
trivial "sarif-listener" program that creates the socket and listens for
notifications.
The patch drops the "-fdiagnostics-format=sarif-socket" from the initial
version of the patch; instead the SARIF_SOCKET output is in addition to other
diagnostic output sinks (such as text).