aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/compile-rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-03-20 10:44:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-03-20 10:44:05 +0200
commitc3635a23429f871c9384ba83f327779f73bebcd7 (patch)
tree57b11d748bfff7b31cd403131e8e3b4d987048c7 /libbuild2/cc/compile-rule.cxx
parent5bb3ef9047bda0f30142fd96112ee00a1c64d2a1 (diff)
Don't create file cache entry for non-existent .ii file
Diffstat (limited to 'libbuild2/cc/compile-rule.cxx')
-rw-r--r--libbuild2/cc/compile-rule.cxx8
1 files changed, 7 insertions, 1 deletions
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);