Skip to content

Commit

Permalink
cswrap-core: bypass the analyzer when invoked with -MM
Browse files Browse the repository at this point in the history
This brings significant speedup while processing the %install script
of xfsprogs-5.12.0-4.el9 with csmock-plugin-clang enabled.
  • Loading branch information
kdudka committed Aug 17, 2021
1 parent 8e9af70 commit f02ccc2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cswrap-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ static int translate_args_for_analyzer(int argc, char **argv)
/* preprocessing --> bypass analyzer in order to not break ccache */
return -1;

if (STREQ(arg, "-MM"))
/* tracking includes --> bypass the analyzer to save resources */
return -1;

if (is_def_inc(arg)) {
if (is_bare_def_inc(arg))
/* bare -D or -I --> we need to take the next arg, too */
Expand Down

0 comments on commit f02ccc2

Please sign in to comment.