summaryrefslogtreecommitdiff
path: root/rules.ninja
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-07-05 20:31:33 -0700
committerMichael Forney <mforney@mforney.org>2019-07-06 01:24:36 -0700
commite2e5e98bcd0badcd437b8a67aa0986ed6d6678a9 (patch)
treef99afe160ef23a961f19231fc08e3666a5a34851 /rules.ninja
parent775f76f04ddfdf2f694c57951b97ed704232ad8b (diff)
Use a separate preprocessor rule
Otherwise, we end up passing both -c and -E to the compiler.
Diffstat (limited to 'rules.ninja')
-rw-r--r--rules.ninja6
1 files changed, 6 insertions, 0 deletions
diff --git a/rules.ninja b/rules.ninja
index b4cd0187..f9a42064 100644
--- a/rules.ninja
+++ b/rules.ninja
@@ -9,6 +9,12 @@ rule cc
deps = gcc
description = CC $out
+rule cpp
+ command = $cc -MMD -MF $out.d $cflags -E -P -o $out $in
+ depfile = $out.d
+ deps = gcc
+ description = CPP $out
+
rule as
command = $as $asflags -o $out $in