aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2')
-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);