aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/bin
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/bin')
-rw-r--r--libbuild2/bin/guess.cxx12
-rw-r--r--libbuild2/bin/guess.hxx9
2 files changed, 21 insertions, 0 deletions
diff --git a/libbuild2/bin/guess.cxx b/libbuild2/bin/guess.cxx
index 219b8e8..8dd3cb6 100644
--- a/libbuild2/bin/guess.cxx
+++ b/libbuild2/bin/guess.cxx
@@ -363,6 +363,9 @@ namespace build2
// will need to figure out what's important (some of them are clearly
// for debugging of ld itself).
//
+ // See also the note on environment and caching below if adding any new
+ // variables.
+ //
static const char* gnu_ld_env[] = {
"LD_RUN_PATH", "GNUTARGET", "LDEMULATION", "COLLECT_NO_DEMANGLE", nullptr};
@@ -381,6 +384,9 @@ namespace build2
// First check the cache.
//
+ // Note that none of the information that we cache can be affected by
+ // the environment.
+ //
string key;
{
sha256 cs;
@@ -569,6 +575,9 @@ namespace build2
// Resource compiler environment variables.
//
+ // See also the note on environment and caching below if adding any new
+ // variables.
+ //
static const char* msvc_rc_env[] = {"INCLUDE", nullptr};
// Extracting rc information requires running it which can become
@@ -583,6 +592,9 @@ namespace build2
// First check the cache.
//
+ // Note that none of the information that we cache can be affected by
+ // the environment.
+ //
string key;
{
sha256 cs;
diff --git a/libbuild2/bin/guess.hxx b/libbuild2/bin/guess.hxx
index e5da263..3307999 100644
--- a/libbuild2/bin/guess.hxx
+++ b/libbuild2/bin/guess.hxx
@@ -31,6 +31,9 @@ namespace build2
// The environment is an optional list of environment variables that
// affect ar/ranlib result.
//
+ // Watch out for the environment not to affect any of the extracted
+ // information since we cache it.
+ //
struct ar_info
{
process_path ar_path;
@@ -80,6 +83,9 @@ namespace build2
// The environment is an optional list of environment variables that
// affect the linker result.
//
+ // Watch out for the environment not to affect any of the extracted
+ // information since we cache it.
+ //
// Note that for now the version is extracted only for some linkers. Once
// it's done for all of them, we should drop optional.
//
@@ -113,6 +119,9 @@ namespace build2
// The environment is an optional list of environment variables that
// affect the resource compiler result.
//
+ // Watch out for the environment not to affect any of the extracted
+ // information since we cache it.
+ //
struct rc_info
{
process_path path;