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 <algorithm> | 5 #include <algorithm> |
6 #include <set> | 6 #include <set> |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "tools/gn/commands.h" | 10 #include "tools/gn/commands.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 for (ConfigValuesIterator iter(target); !iter.done(); iter.Next()) { | 205 for (ConfigValuesIterator iter(target); !iter.done(); iter.Next()) { |
206 if ((iter.cur().*getter)().empty()) | 206 if ((iter.cur().*getter)().empty()) |
207 continue; | 207 continue; |
208 | 208 |
209 // Optional blame sub-head. | 209 // Optional blame sub-head. |
210 if (display_blame) { | 210 if (display_blame) { |
211 const Config* config = iter.GetCurrentConfig(); | 211 const Config* config = iter.GetCurrentConfig(); |
212 if (config) { | 212 if (config) { |
213 // Source of this value is a config. | 213 // Source of this value is a config. |
214 out << " From " << config->label().GetUserVisibleName(false) << "\n"; | 214 out << " From " << config->label().GetUserVisibleName(false) << "\n"; |
| 215 OutputSourceOfDep(target, config->label(), out); |
215 } else { | 216 } else { |
216 // Source of this value is the target itself. | 217 // Source of this value is the target itself. |
217 out << " From " << target->label().GetUserVisibleName(false) << "\n"; | 218 out << " From " << target->label().GetUserVisibleName(false) << "\n"; |
218 } | 219 } |
219 OutputSourceOfDep(target, config->label(), out); | |
220 } | 220 } |
221 | 221 |
222 // Actual values. | 222 // Actual values. |
223 ConfigValuesToStream(iter.cur(), getter, writer, out); | 223 ConfigValuesToStream(iter.cur(), getter, writer, out); |
224 } | 224 } |
225 | 225 |
226 // First write the values from the config itself. | 226 // First write the values from the config itself. |
227 if (!(target->config_values().*getter)().empty()) { | 227 if (!(target->config_values().*getter)().empty()) { |
228 if (display_blame) | 228 if (display_blame) |
229 out << " From " << target->label().GetUserVisibleName(false) << "\n"; | 229 out << " From " << target->label().GetUserVisibleName(false) << "\n"; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 OUTPUT_CONFIG_VALUE(cflags_objc, std::string) | 388 OUTPUT_CONFIG_VALUE(cflags_objc, std::string) |
389 OUTPUT_CONFIG_VALUE(cflags_objcc, std::string) | 389 OUTPUT_CONFIG_VALUE(cflags_objcc, std::string) |
390 PrintLdflags(target, true); | 390 PrintLdflags(target, true); |
391 | 391 |
392 PrintDeps(target, true); | 392 PrintDeps(target, true); |
393 | 393 |
394 return 0; | 394 return 0; |
395 } | 395 } |
396 | 396 |
397 } // namespace commands | 397 } // namespace commands |
OLD | NEW |