Index: tools/gn/config.cc |
diff --git a/tools/gn/config.cc b/tools/gn/config.cc |
index dce951f65b33384fec9403cb65176ef6354662d8..5684c69b0d52af4181fc1623dc6f931bf5a0ee95 100644 |
--- a/tools/gn/config.cc |
+++ b/tools/gn/config.cc |
@@ -9,7 +9,8 @@ |
#include "tools/gn/scheduler.h" |
Config::Config(const Settings* settings, const Label& label) |
- : Item(settings, label) { |
+ : Item(settings, label), |
+ resolved_(false) { |
} |
Config::~Config() { |
@@ -22,3 +23,16 @@ Config* Config::AsConfig() { |
const Config* Config::AsConfig() const { |
return this; |
} |
+ |
+bool Config::OnResolved(Err* err) { |
+ DCHECK(!resolved_); |
+ resolved_ = true; |
+ |
+ if (!configs_.empty()) { |
+ // Nested configs, flatten. |
Dirk Pranke
2015/09/15 21:31:30
As noted elsewhere, I don't like the use of "neste
|
+ composite_values_ = own_values_; |
+ for (const auto& pair : configs_) |
+ composite_values_.AppendValues(pair.ptr->resolved_values()); |
+ } |
+ return true; |
+} |