aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbuild2/cc/guess.cxx10
-rw-r--r--libbuild2/cc/guess.hxx3
2 files changed, 9 insertions, 4 deletions
diff --git a/libbuild2/cc/guess.cxx b/libbuild2/cc/guess.cxx
index 5ae6fb2..f092933 100644
--- a/libbuild2/cc/guess.cxx
+++ b/libbuild2/cc/guess.cxx
@@ -1878,7 +1878,7 @@ namespace build2
move (ver),
nullopt,
move (gr.signature),
- "",
+ "", // Checksum to be calculated from signature.
move (t),
move (ot),
move (cpat),
@@ -2128,7 +2128,7 @@ namespace build2
move (ver),
nullopt,
move (gr.signature),
- move (gr.checksum), // Calculated on whole -v output.
+ "", // Checksum calculated on whole -v output.
move (t),
move (ot),
move (pat),
@@ -2898,7 +2898,7 @@ namespace build2
move (ver),
move (var_ver),
move (gr.signature),
- move (gr.checksum), // Calculated on whole -v output.
+ "", // Checksum calculated on whole -v output.
move (t),
move (ot),
move (cpat),
@@ -3216,7 +3216,7 @@ namespace build2
move (ver),
nullopt,
move (gr.signature),
- "",
+ "", // Checksum to be calculated from signature.
move (t),
move (ot),
move (pat),
@@ -3370,6 +3370,8 @@ namespace build2
cs.append (gr.type_signature);
}
+ cs.append (r.path.effect_string ());
+
r.checksum = cs.string ();
// Derive binutils pattern unless this has already been done by the
diff --git a/libbuild2/cc/guess.hxx b/libbuild2/cc/guess.hxx
index 7cbbd87..dfa8aa2 100644
--- a/libbuild2/cc/guess.hxx
+++ b/libbuild2/cc/guess.hxx
@@ -160,6 +160,9 @@ namespace build2
// checksum will still change. This is currently the case for all the
// compilers that we support.
//
+ // And we assume that the checksum incorporates the absolute compiler
+ // path. This is used to detect compilation database changes.
+ //
// The target is the compiler's traget architecture triplet. Note that
// unlike all the preceding fields, this one takes into account the
// compile options (e.g., -m32).