diff options
| author | Dan Willemsen <dwillemsen@google.com> | 2015-10-01 16:07:48 -0700 |
|---|---|---|
| committer | Dan Willemsen <dwillemsen@google.com> | 2015-10-01 16:12:36 -0700 |
| commit | b248caabf20589d5f5a3adbb1e88d2c286eaa466 (patch) | |
| tree | e9f5a355e9f41e8a3bbc49e7e110419bfae46f19 /dep.cc | |
| parent | a62b02a1251a0f6c452a25fce03258f12472507f (diff) | |
Use ordered containers to prevent changes to ninja files
When using --gen_all_targets / --gen_all_phony_targets, we're changing
the selected targets using unordered containers. This causes trivial
changes to the makefiles to trigger large changes to the generated ninja
files. Switch to using ordered containers so that the order is the same
every time.
Diffstat (limited to 'dep.cc')
| -rw-r--r-- | dep.cc | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -18,7 +18,9 @@ #include <algorithm> #include <iterator> +#include <map> #include <memory> +#include <set> #include <unordered_map> #include <unordered_set> @@ -524,7 +526,7 @@ class DepBuilder { } Evaluator* ev_; - unordered_map<Symbol, shared_ptr<Rule>> rules_; + map<Symbol, shared_ptr<Rule>> rules_; const unordered_map<Symbol, Vars*>& rule_vars_; unique_ptr<Vars> cur_rule_vars_; @@ -534,7 +536,7 @@ class DepBuilder { shared_ptr<Rule> first_rule_; unordered_map<Symbol, DepNode*> done_; - unordered_set<Symbol> phony_; + set<Symbol> phony_; }; void MakeDep(Evaluator* ev, |
