OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "tools/gn/config.h" | 5 #include "tools/gn/config.h" |
6 | 6 |
7 #include "tools/gn/err.h" | 7 #include "tools/gn/err.h" |
8 #include "tools/gn/input_file_manager.h" | 8 #include "tools/gn/input_file_manager.h" |
9 #include "tools/gn/scheduler.h" | 9 #include "tools/gn/scheduler.h" |
10 | 10 |
11 Config::Config(const Settings* settings, const Label& label) | 11 Config::Config(const Settings* settings, |
12 : Item(settings, label), | 12 const Label& label, |
13 resolved_(false) { | 13 const InputFileSet& input_files) |
14 } | 14 : Item(settings, label, input_files), resolved_(false) {} |
15 | 15 |
16 Config::~Config() { | 16 Config::~Config() { |
17 } | 17 } |
18 | 18 |
19 Config* Config::AsConfig() { | 19 Config* Config::AsConfig() { |
20 return this; | 20 return this; |
21 } | 21 } |
22 | 22 |
23 const Config* Config::AsConfig() const { | 23 const Config* Config::AsConfig() const { |
24 return this; | 24 return this; |
(...skipping 17 matching lines...) Expand all Loading... |
42 // targets. Do the same for Target.configs_ when a target is resolved. This | 42 // targets. Do the same for Target.configs_ when a target is resolved. This |
43 // will naturally de-dupe and also prevents recursive config walking to | 43 // will naturally de-dupe and also prevents recursive config walking to |
44 // compute every possible flag, although it will expand the configs list on | 44 // compute every possible flag, although it will expand the configs list on |
45 // a target nontrivially (depending on build configuration). | 45 // a target nontrivially (depending on build configuration). |
46 composite_values_ = own_values_; | 46 composite_values_ = own_values_; |
47 for (const auto& pair : configs_) | 47 for (const auto& pair : configs_) |
48 composite_values_.AppendValues(pair.ptr->resolved_values()); | 48 composite_values_.AppendValues(pair.ptr->resolved_values()); |
49 } | 49 } |
50 return true; | 50 return true; |
51 } | 51 } |
OLD | NEW |