aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/utility.hxx
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/utility.hxx
parent834152a6e3f3e8459b53e49370bfdd82685a700d (diff)
Track changes to environment in cc rules
Diffstat (limited to 'libbuild2/utility.hxx')
-rw-r--r--libbuild2/utility.hxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/libbuild2/utility.hxx b/libbuild2/utility.hxx
index 6616f78..b4a8ce4 100644
--- a/libbuild2/utility.hxx
+++ b/libbuild2/utility.hxx
@@ -802,6 +802,35 @@ namespace build2
const cstrings&,
bool = false);
+ // Hash environment variable (its name and value) normally to be used as a
+ // checksum. See also config::save_environment().
+ //
+ void
+ hash_environment (sha256&, const char* name);
+
+ void
+ hash_environment (sha256&, const string& name);
+
+ void
+ hash_environment (sha256&, initializer_list<const char*> names);
+
+ string
+ hash_environment (initializer_list<const char*> names);
+
+ void
+ hash_environment (sha256&, const strings& names);
+
+ string
+ hash_environment (const strings& names);
+
+ // A NULL-terminated list of variables (may itself be NULL).
+ //
+ void
+ hash_environment (sha256&, const char* const* names);
+
+ string
+ hash_environment (const char* const* names);
+
// Find in the string the stem separated from other characters with the
// specified separators or begin/end of the string. Return the stem's
// position or npos if not found.