Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: tools/gn/command_desc.cc

Issue 558763002: Require build directories exist for some GN commands. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: file path literal Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/command_check.cc ('k') | tools/gn/command_gen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « tools/gn/command_check.cc ('k') | tools/gn/command_gen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698