From 0353b231d51ab7ea5ead98ac838e7c2ba1b0df89 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 20 Apr 2021 11:19:28 +0200 Subject: Track changes to environment in cc rules --- libbuild2/cc/compile-rule.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libbuild2/cc/compile-rule.cxx') 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 (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 -- cgit v1.1