aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-08-28 12:05:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-08-28 12:05:57 +0200
commita404382a60b74f0df46dc102ee309913214fd8e6 (patch)
tree6e69c6ac275c79bd04ab6b5bb097a5583fbeb4ad /libbuild2/cc
parent85a97e180e5f68d62821bfb9c7cad212737f2f9c (diff)
Don't assume preprocessed TU exists if reprocessing (GH issue #409)
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/compile-rule.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx
index faba121..cebd244 100644
--- a/libbuild2/cc/compile-rule.cxx
+++ b/libbuild2/cc/compile-rule.cxx
@@ -4167,9 +4167,10 @@ namespace build2
if (l->empty ()) // Done, nothing changed.
{
// If modules are enabled, then we keep the preprocessed output
- // around (see apply() for details).
+ // around (see apply() for details). Unless reprocessing was
+ // requested.
//
- if (modules)
+ if (modules && !reprocess)
{
result.first = ctx.fcache->create_existing (t.path () + pext);
result.second = true;