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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 int RunDesc(const std::vector<std::string>& args) { | 572 int RunDesc(const std::vector<std::string>& args) { |
573 if (args.size() != 2 && args.size() != 3) { | 573 if (args.size() != 2 && args.size() != 3) { |
574 Err(Location(), "You're holding it wrong.", | 574 Err(Location(), "You're holding it wrong.", |
575 "Usage: \"gn desc <out_dir> <target_name> [<what to display>]\"") | 575 "Usage: \"gn desc <out_dir> <target_name> [<what to display>]\"") |
576 .PrintToStdout(); | 576 .PrintToStdout(); |
577 return 1; | 577 return 1; |
578 } | 578 } |
579 | 579 |
580 // Deliberately leaked to avoid expensive process teardown. | 580 // Deliberately leaked to avoid expensive process teardown. |
581 Setup* setup = new Setup; | 581 Setup* setup = new Setup; |
582 if (!setup->DoSetup(args[0])) | 582 if (!setup->DoSetup(args[0], false)) |
583 return 1; | 583 return 1; |
584 if (!setup->Run()) | 584 if (!setup->Run()) |
585 return 1; | 585 return 1; |
586 | 586 |
587 const Target* target = ResolveTargetFromCommandLineString(setup, args[1]); | 587 const Target* target = ResolveTargetFromCommandLineString(setup, args[1]); |
588 if (!target) | 588 if (!target) |
589 return 1; | 589 return 1; |
590 | 590 |
591 #define CONFIG_VALUE_HANDLER(name, type) \ | 591 #define CONFIG_VALUE_HANDLER(name, type) \ |
592 } else if (what == #name) { OUTPUT_CONFIG_VALUE(name, type) | 592 } else if (what == #name) { OUTPUT_CONFIG_VALUE(name, type) |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 // so always display them, even for groups and such. | 718 // so always display them, even for groups and such. |
719 PrintLibs(target, true); | 719 PrintLibs(target, true); |
720 PrintLibDirs(target, true); | 720 PrintLibDirs(target, true); |
721 | 721 |
722 PrintDeps(target, true); | 722 PrintDeps(target, true); |
723 | 723 |
724 return 0; | 724 return 0; |
725 } | 725 } |
726 | 726 |
727 } // namespace commands | 727 } // namespace commands |
OLD | NEW |