| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 return; | 162 return; |
| 163 | 163 |
| 164 if (display_header) | 164 if (display_header) |
| 165 OutputString("\nlib_dirs\n"); | 165 OutputString("\nlib_dirs\n"); |
| 166 | 166 |
| 167 for (size_t i = 0; i < lib_dirs.size(); i++) | 167 for (size_t i = 0; i < lib_dirs.size(); i++) |
| 168 OutputString(" " + FormatSourceDir(lib_dirs[i]) + "\n"); | 168 OutputString(" " + FormatSourceDir(lib_dirs[i]) + "\n"); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void PrintLibs(const Target* target, bool display_header) { | 171 void PrintLibs(const Target* target, bool display_header) { |
| 172 const OrderedSet<std::string>& libs = target->all_libs(); | 172 const OrderedSet<LibFile>& libs = target->all_libs(); |
| 173 if (libs.empty()) | 173 if (libs.empty()) |
| 174 return; | 174 return; |
| 175 | 175 |
| 176 if (display_header) | 176 if (display_header) |
| 177 OutputString("\nlibs\n"); | 177 OutputString("\nlibs\n"); |
| 178 | 178 |
| 179 for (size_t i = 0; i < libs.size(); i++) | 179 for (size_t i = 0; i < libs.size(); i++) |
| 180 OutputString(" " + libs[i] + "\n"); | 180 OutputString(" " + libs[i].value() + "\n"); |
| 181 } | 181 } |
| 182 | 182 |
| 183 void PrintPublic(const Target* target, bool display_header) { | 183 void PrintPublic(const Target* target, bool display_header) { |
| 184 if (display_header) | 184 if (display_header) |
| 185 OutputString("\npublic:\n"); | 185 OutputString("\npublic:\n"); |
| 186 | 186 |
| 187 if (target->all_headers_public()) { | 187 if (target->all_headers_public()) { |
| 188 OutputString(" [All headers listed in the sources are public.]\n"); | 188 OutputString(" [All headers listed in the sources are public.]\n"); |
| 189 return; | 189 return; |
| 190 } | 190 } |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 // so always display them, even for groups and such. | 743 // so always display them, even for groups and such. |
| 744 PrintLibs(target, true); | 744 PrintLibs(target, true); |
| 745 PrintLibDirs(target, true); | 745 PrintLibDirs(target, true); |
| 746 | 746 |
| 747 PrintDeps(target, true); | 747 PrintDeps(target, true); |
| 748 | 748 |
| 749 return 0; | 749 return 0; |
| 750 } | 750 } |
| 751 | 751 |
| 752 } // namespace commands | 752 } // namespace commands |
| OLD | NEW |