From 78f700c35c07b5ef5663716461852fbdee287817 Mon Sep 17 00:00:00 2001 From: bungeman Date: Tue, 6 Aug 2019 17:27:53 -0400 Subject: Recommend MD over MMD for header dependencies. The MMD flag will silently omit includes found through pointy brackets or system include paths. This can lead to issues not only when system headers change, but any paths included through the isystem flag. Because the isystem flag implicitly turns off warnings as errors it has often come to be used as a "not my code" flag used with local third party dependencies which may be frequently updated or changed for debugging. As a result, it is far safer to default to MD (which includes all include dependencies) in this example. --- doc/manual.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/manual.asciidoc b/doc/manual.asciidoc index e49d26d..0bada17 100644 --- a/doc/manual.asciidoc +++ b/doc/manual.asciidoc @@ -569,10 +569,10 @@ Use it like in the following example: ---- rule cc depfile = $out.d - command = gcc -MMD -MF $out.d [other gcc flags here] + command = gcc -MD -MF $out.d [other gcc flags here] ---- -The `-MMD` flag to `gcc` tells it to output header dependencies, and +The `-MD` flag to `gcc` tells it to output header dependencies, and the `-MF` flag tells it where to write them. deps -- cgit v0.12