diff options
author | Dan Willemsen <dwillemsen@google.com> | 2017-11-21 13:22:26 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2017-11-21 15:15:55 -0800 |
commit | ff90ea321443ef949e993aa554a4836054cefbf5 (patch) | |
tree | 94deaf03d34b53927dd39c7b578a49b0beeebf8a /eval.h | |
parent | eaab22d4d5f73bb5a8bd120e9cde3283c4ab61f8 (diff) | |
download | kati-ff90ea321443ef949e993aa554a4836054cefbf5.tar.gz |
Fix list of used environment variables
With the introduction of deprecated / obsolete variable support, we
started calling LookupVarInLocalScope on the variable we were setting
with = or :=. This was fine, except it also marked those variables as
used environment variables (whether they were set in the environment or
not). So changing one of these environment variables would cause kati to
regenerate the ninja file even though nothing would change.
To fix this, add new Peek* functions that don't record the variables as
used, but can still be used to check to see if the variable has been
deprecated or is obsolete.
Diffstat (limited to 'eval.h')
-rw-r--r-- | eval.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -105,6 +105,9 @@ class Evaluator { Var* LookupVarGlobal(Symbol name); + // Equivalent to LookupVarInCurrentScope, but doesn't mark as used. + Var* PeekVarInCurrentScope(Symbol name); + unordered_map<Symbol, Vars*> rule_vars_; vector<const Rule*> rules_; unordered_map<Symbol, bool> exports_; |