-
Describe the bug GCC 14, option When building with this option, the number of SARIF analysis reported issues is inconsistant (sometime all issues are reported, most of the time it's not, many issues are missing). At first I thought the bug was due to the way each generated SARIF files is saved all in one place inside the build directory. But in my investigations, trying to understand why the number of generated issues was not repeatable, I toggled off To Reproduce Install gnu-arm toolchain v14.2.rel1 to benefit from this new option. Compile at least twice consecutively the
First compilation should see the various SARIF files have the correct diagnostique reported. Now disable Expected behavior Analyzer results should not be affected by the use of Impact Logs and console output Environment (please complete the following information):
Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This sounds like a ccache issue and not a Zephyr issue. The use of If Zephyr SCA had direct support for For now, this is not really a Zephyr bug, but feel free to open an enhancement issue to support |
Beta Was this translation helpful? Give feedback.
This sounds like a ccache issue and not a Zephyr issue.
Ref: ccache/ccache#1466
The use of
diagnostics-format
is done as-DEXTRA_CFLAGS="-fanalyzer -fdiagnostics-format=sarif-file"
(and AFLAGS / CXXFLAGS) meaning the build system cannot really know that ccache is not optimal in this case.If Zephyr SCA had direct support for
diagnostics-format=sarif-file
, for example as part of its https://docs.zephyrproject.org/latest/develop/sca/gcc.html GCC SCA support, then we could warn the user when ccache is used, or perhaps also default the build to not use ccache per default in those cases.For now, this is not really a Zephyr bug, but feel free to open an enhancement issue to support
sarif-file
…