Skip to content

Commit 1161067

Browse files
committed
cswrap-core: distinguish gcc -M/-MM from -MD/-MMD
While -M and -MM imply -E (preprocessor only), -MD and -MMD do not. Closes: #35
1 parent 3d6c2ca commit 1161067

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cswrap-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ static int translate_args_for_analyzer(int argc, char **argv)
262262
/* preprocessing --> bypass analyzer in order to not break ccache */
263263
return -1;
264264

265-
if (MATCH_PREFIX(arg, "-M"))
266-
/* tracking includes --> bypass the analyzer to save resources */
265+
if (STREQ(arg, "-M") || STREQ(arg, "-MM"))
266+
/* -M and -MM (unlike -MD and -MMD) imply -E (preprocessor only) */
267267
return -1;
268268

269269
if (is_def_inc(arg)) {

0 commit comments

Comments
 (0)