| 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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 int RunDesc(const std::vector<std::string>& args) { | 610 int RunDesc(const std::vector<std::string>& args) { |
| 611 if (args.size() != 2 && args.size() != 3) { | 611 if (args.size() != 2 && args.size() != 3) { |
| 612 Err(Location(), "You're holding it wrong.", | 612 Err(Location(), "You're holding it wrong.", |
| 613 "Usage: \"gn desc <out_dir> <target_name> [<what to display>]\"") | 613 "Usage: \"gn desc <out_dir> <target_name> [<what to display>]\"") |
| 614 .PrintToStdout(); | 614 .PrintToStdout(); |
| 615 return 1; | 615 return 1; |
| 616 } | 616 } |
| 617 | 617 |
| 618 // Deliberately leaked to avoid expensive process teardown. | 618 // Deliberately leaked to avoid expensive process teardown. |
| 619 Setup* setup = new Setup; | 619 Setup* setup = new Setup; |
| 620 setup->build_settings().set_check_for_bad_items(false); |
| 620 if (!setup->DoSetup(args[0], false)) | 621 if (!setup->DoSetup(args[0], false)) |
| 621 return 1; | 622 return 1; |
| 622 if (!setup->Run()) | 623 if (!setup->Run()) |
| 623 return 1; | 624 return 1; |
| 624 | 625 |
| 625 const Target* target = ResolveTargetFromCommandLineString(setup, args[1]); | 626 const Target* target = ResolveTargetFromCommandLineString(setup, args[1]); |
| 626 if (!target) | 627 if (!target) |
| 627 return 1; | 628 return 1; |
| 628 | 629 |
| 629 #define CONFIG_VALUE_HANDLER(name, type) \ | 630 #define CONFIG_VALUE_HANDLER(name, type) \ |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 // so always display them, even for groups and such. | 759 // so always display them, even for groups and such. |
| 759 PrintLibs(target, true); | 760 PrintLibs(target, true); |
| 760 PrintLibDirs(target, true); | 761 PrintLibDirs(target, true); |
| 761 | 762 |
| 762 PrintDeps(target, true); | 763 PrintDeps(target, true); |
| 763 | 764 |
| 764 return 0; | 765 return 0; |
| 765 } | 766 } |
| 766 | 767 |
| 767 } // namespace commands | 768 } // namespace commands |
| OLD | NEW |