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

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

Issue 2492273002: GN: Always check for bad items. (Closed)
Patch Set: Created 4 years, 1 month 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
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 if (args.size() != 2 && args.size() != 3) { 423 if (args.size() != 2 && args.size() != 3) {
424 Err(Location(), "You're holding it wrong.", 424 Err(Location(), "You're holding it wrong.",
425 "Usage: \"gn desc <out_dir> <target_name> [<what to display>]\"") 425 "Usage: \"gn desc <out_dir> <target_name> [<what to display>]\"")
426 .PrintToStdout(); 426 .PrintToStdout();
427 return 1; 427 return 1;
428 } 428 }
429 const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); 429 const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
430 430
431 // Deliberately leaked to avoid expensive process teardown. 431 // Deliberately leaked to avoid expensive process teardown.
432 Setup* setup = new Setup; 432 Setup* setup = new Setup;
433 setup->build_settings().set_check_for_bad_items(false);
434 if (!setup->DoSetup(args[0], false)) 433 if (!setup->DoSetup(args[0], false))
435 return 1; 434 return 1;
436 if (!setup->Run()) 435 if (!setup->Run())
437 return 1; 436 return 1;
438 437
439 // Resolve target(s) and config from inputs. 438 // Resolve target(s) and config from inputs.
440 UniqueVector<const Target*> target_matches; 439 UniqueVector<const Target*> target_matches;
441 UniqueVector<const Config*> config_matches; 440 UniqueVector<const Config*> config_matches;
442 UniqueVector<const Toolchain*> toolchain_matches; 441 UniqueVector<const Toolchain*> toolchain_matches;
443 UniqueVector<SourceFile> file_matches; 442 UniqueVector<SourceFile> file_matches;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 500
502 if (!PrintConfig(config, what_to_print, !multiple_outputs)) 501 if (!PrintConfig(config, what_to_print, !multiple_outputs))
503 return 1; 502 return 1;
504 } 503 }
505 } 504 }
506 505
507 return 0; 506 return 0;
508 } 507 }
509 508
510 } // namespace commands 509 } // namespace commands
OLDNEW
« tools/gn/command_args.cc ('K') | « tools/gn/command_args.cc ('k') | tools/gn/command_ls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698