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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "build/build_config.h" |
8 #include "tools/gn/commands.h" | 9 #include "tools/gn/commands.h" |
9 #include "tools/gn/err.h" | 10 #include "tools/gn/err.h" |
10 #include "tools/gn/location.h" | 11 #include "tools/gn/location.h" |
11 #include "tools/gn/standard_out.h" | 12 #include "tools/gn/standard_out.h" |
12 #include "tools/gn/switches.h" | 13 #include "tools/gn/switches.h" |
13 | 14 |
14 // Only the GN-generated build makes this header for now. | 15 // Only the GN-generated build makes this header for now. |
15 // TODO(brettw) consider adding this if we need it in GYP. | 16 // TODO(brettw) consider adding this if we need it in GYP. |
16 #if defined(GN_BUILD) | 17 #if defined(GN_BUILD) |
17 #include "tools/gn/last_commit_position.h" | 18 #include "tools/gn/last_commit_position.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 retval = found_command->second.runner(args); | 74 retval = found_command->second.runner(args); |
74 } else { | 75 } else { |
75 Err(Location(), | 76 Err(Location(), |
76 "Command \"" + command + "\" unknown.").PrintToStdout(); | 77 "Command \"" + command + "\" unknown.").PrintToStdout(); |
77 commands::RunHelp(std::vector<std::string>()); | 78 commands::RunHelp(std::vector<std::string>()); |
78 retval = 1; | 79 retval = 1; |
79 } | 80 } |
80 | 81 |
81 exit(retval); // Don't free memory, it can be really slow! | 82 exit(retval); // Don't free memory, it can be really slow! |
82 } | 83 } |
OLD | NEW |