From c3635a23429f871c9384ba83f327779f73bebcd7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 20 Mar 2021 10:44:05 +0200 Subject: Don't create file cache entry for non-existent .ii file --- libbuild2/cc/compile-rule.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index cb11728..a27530a 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -1256,6 +1256,9 @@ namespace build2 // // @@ TMP: probably outdated. Probably the same for partitions. // + // @@ See also similar check in extract_headers(), existing entry + // case. + // if (ctype == compiler_type::msvc) { if (ut == unit_type::module_intf) @@ -4029,7 +4032,10 @@ namespace build2 // If modules are enabled, then we keep the preprocessed output // around (see apply() for details). // - return modules + // See apply() for details on the extra MSVC check. + // + return modules && (ctype != compiler_type::msvc || + md.type != unit_type::module_intf) ? make_pair (ctx.fcache.create_existing (t.path () + x_pext), true) : make_pair (file_cache::entry (), false); -- cgit v1.1