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/utility.hxx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'libbuild2/utility.hxx') 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 names); + + string + hash_environment (initializer_list 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. -- cgit v1.1