Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: tools/gn/config.cc

Issue 2940873002: Implement tracking of BUILD.gn files used to define target, toolchain or (Closed)
Patch Set: Fix compilation after rebase. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/config.h ('k') | tools/gn/config_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « tools/gn/config.h ('k') | tools/gn/config_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698