aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/compile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/cc/compile.cxx')
-rw-r--r--build2/cc/compile.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx
index 32b5f6e..1eb4c9b 100644
--- a/build2/cc/compile.cxx
+++ b/build2/cc/compile.cxx
@@ -567,11 +567,14 @@ namespace build2
pair<auto_rmfile, bool> p (inject (act, t, lo, src, dd, u));
dd.close ();
- // If the preprocessed output is suitable for compilation, pass it
- // along.
+ // If the preprocessed output is suitable for compilation and is not
+ // disabled, pass it along.
//
- if (p.second)
- md.psrc = move (p.first);
+ if (!p.first.path ().empty () && p.second)
+ {
+ if (!cast_false<bool> (t[c_reprocess]))
+ md.psrc = move (p.first);
+ }
md.mt = u ? timestamp_nonexistent : mt;
}