summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbungeman <bungeman@chromium.org>2019-08-06 17:27:53 -0400
committerGitHub <noreply@github.com>2019-08-06 17:27:53 -0400
commit78f700c35c07b5ef5663716461852fbdee287817 (patch)
treec684fe3b4d30ae9e0211c3a67263337a3f234dda
parent0ea27d728d34e3e2a1eae6f54dbe6ca0822a0b4a (diff)
downloadninja-78f700c35c07b5ef5663716461852fbdee287817.tar.gz
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.
-rw-r--r--doc/manual.asciidoc4
1 files 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