https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115970
--- Comment #4 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Created attachment 58854 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58854&action=edit WIP patch to output diagnostics as SARIF notifications to a unix domain socket The attached patch is 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. The patch also implements a trivial "sarif-listener" program that creates the socket and listens for notifications. The patch adds a -fdiagnostics-format=sarif-socket which currently is also required, but it might be good to simply have the environment variable. That way an IDE could make the socket and set the env var when invoking a build framework, and then all diagnostics would go to the IDE, rather than textually. Or we could do both text *and* socket output, but that would require more surgery to the diagnostics framework.