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 <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 Loading... |
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 Loading... |
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 |
OLD | NEW |