aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/compile-rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-04-20 11:19:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-04-20 11:26:05 +0200
commit0353b231d51ab7ea5ead98ac838e7c2ba1b0df89 (patch)
treec5b0794512587a1062de97153df6f0b236f928d3 /libbuild2/cc/compile-rule.cxx
parent834152a6e3f3e8459b53e49370bfdd82685a700d (diff)
Track changes to environment in cc rules
Diffstat (limited to 'libbuild2/cc/compile-rule.cxx')
-rw-r--r--libbuild2/cc/compile-rule.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx
index b5016bc..ce586bb 100644
--- a/libbuild2/cc/compile-rule.cxx
+++ b/libbuild2/cc/compile-rule.cxx
@@ -197,7 +197,7 @@ namespace build2
compile_rule::
compile_rule (data&& d)
: common (move (d)),
- rule_id (string (x) += ".compile 4")
+ rule_id (string (x) += ".compile 5")
{
static_assert (sizeof (match_data) <= target::data_size,
"insufficient space");
@@ -929,6 +929,11 @@ namespace build2
if (dd.expect (cast<string> (rs[x_checksum])) != nullptr)
l4 ([&]{trace << "compiler mismatch forcing update of " << t;});
+ // Then the compiler environment checksum.
+ //
+ if (dd.expect (env_checksum) != nullptr)
+ l4 ([&]{trace << "environment mismatch forcing update of " << t;});
+
// Then the options checksum.
//
// The idea is to keep them exactly as they are passed to the compiler