https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115662
Bug ID: 115662 Summary: Feature request: support for linking SARIF files together Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: SARIF Severity: enhancement Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: egallager at gcc dot gnu.org Target Milestone: --- I brought this up on IRC previously, but since I can't remember when, I'll rewrite it the best I can here: Basically, there are cases where one might want to combine a bunch of SARIF files together into a single one. Previously I thought it might be possible to simply `cat` them together, but apparently it involves something a little bit more complex, like json-ld: https://json-ld.org/ So basically, my proposal is this: if a build has taken place where -fdiagnostics-format=sarif-file has been used for some of the individual compilations, and then the gcc driver is invoked for the linking step with that same flag, and it can still find all the SARIF files, it should then invoke json-ld (or possibly our own implementation) to link all of the SARIF files together into a new one. This would be helpful for applications that might want to just read a single SARIF file at a time.