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/target.h" | 5 #include "tools/gn/target.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "tools/gn/config_values_extractors.h" | 8 #include "tools/gn/config_values_extractors.h" |
9 #include "tools/gn/scheduler.h" | 9 #include "tools/gn/scheduler.h" |
10 | 10 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 from_target->direct_dependent_configs().begin(), | 204 from_target->direct_dependent_configs().begin(), |
205 from_target->direct_dependent_configs().end()); | 205 from_target->direct_dependent_configs().end()); |
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 void Target::PullRecursiveHardDeps() { | 209 void Target::PullRecursiveHardDeps() { |
210 for (size_t dep_i = 0; dep_i < deps_.size(); dep_i++) { | 210 for (size_t dep_i = 0; dep_i < deps_.size(); dep_i++) { |
211 const Target* dep = deps_[dep_i].ptr; | 211 const Target* dep = deps_[dep_i].ptr; |
212 if (dep->hard_dep()) | 212 if (dep->hard_dep()) |
213 recursive_hard_deps_.insert(dep); | 213 recursive_hard_deps_.insert(dep); |
214 recursive_hard_deps_.insert(dep->recursive_hard_deps().begin(), | 214 |
215 dep->recursive_hard_deps().end()); | 215 // Android STL doesn't like insert(begin, end) so do it manually. |
| 216 // TODO(brettw) this can be changed to insert(dep->begin(), dep->end()) when |
| 217 // Android uses a better STL. |
| 218 for (std::set<const Target*>::const_iterator cur = |
| 219 dep->recursive_hard_deps().begin(); |
| 220 cur != dep->recursive_hard_deps().end(); ++cur) |
| 221 recursive_hard_deps_.insert(*cur); |
216 } | 222 } |
217 } | 223 } |
OLD | NEW |