From a404382a60b74f0df46dc102ee309913214fd8e6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 28 Aug 2024 12:05:57 +0200 Subject: Don't assume preprocessed TU exists if reprocessing (GH issue #409) --- libbuild2/cc/compile-rule.cxx | 5 +++-- 1 file 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; -- cgit v1.1