aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/module.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc/module.cxx')
-rw-r--r--libbuild2/cc/module.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/libbuild2/cc/module.cxx b/libbuild2/cc/module.cxx
index 5bb3f60..7ef8cd5 100644
--- a/libbuild2/cc/module.cxx
+++ b/libbuild2/cc/module.cxx
@@ -202,8 +202,22 @@ namespace build2
}
}
+ // Hash the environment (used for change detection).
+ //
+ // Note that for simplicity we use the combined checksum for both
+ // compilation and linking (which may compile, think LTO).
+ //
+ {
+ sha256 cs;
+ hash_environment (cs, xi.compiler_environment);
+ hash_environment (cs, xi.platform_environment);
+ env_checksum = cs.string ();
+ }
+
// Assign values to variables that describe the compiler.
//
+ // @@ TODO: env_checksum.
+ //
rs.assign (x_path) = process_path_ex (xi.path, x_name, xi.checksum);
const strings& xm (cast<strings> (rs.assign (x_mode) = move (mode)));