| 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 <map> | 5 #include <map> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "tools/gn/commands.h" | 9 #include "tools/gn/commands.h" |
| 10 #include "tools/gn/filesystem_utils.h" | 10 #include "tools/gn/filesystem_utils.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 } | 223 } |
| 224 | 224 |
| 225 const CommandLine* cmdline = CommandLine::ForCurrentProcess(); | 225 const CommandLine* cmdline = CommandLine::ForCurrentProcess(); |
| 226 bool tree = cmdline->HasSwitch("tree"); | 226 bool tree = cmdline->HasSwitch("tree"); |
| 227 bool all = cmdline->HasSwitch("all"); | 227 bool all = cmdline->HasSwitch("all"); |
| 228 bool all_toolchains = cmdline->HasSwitch("all-toolchains"); | 228 bool all_toolchains = cmdline->HasSwitch("all-toolchains"); |
| 229 bool files = cmdline->HasSwitch("files"); | 229 bool files = cmdline->HasSwitch("files"); |
| 230 | 230 |
| 231 Setup* setup = new Setup; | 231 Setup* setup = new Setup; |
| 232 setup->set_check_for_bad_items(false); | 232 setup->set_check_for_bad_items(false); |
| 233 if (!setup->DoSetup(args[0]) || !setup->Run()) | 233 if (!setup->DoSetup(args[0], false) || !setup->Run()) |
| 234 return 1; | 234 return 1; |
| 235 | 235 |
| 236 // Figure out the target or targets that the user is querying. | 236 // Figure out the target or targets that the user is querying. |
| 237 std::vector<const Target*> query; | 237 std::vector<const Target*> query; |
| 238 if (!ResolveTargetsFromCommandLinePattern(setup, args[1], all_toolchains, | 238 if (!ResolveTargetsFromCommandLinePattern(setup, args[1], all_toolchains, |
| 239 &query)) | 239 &query)) |
| 240 return 1; | 240 return 1; |
| 241 if (query.empty()) { | 241 if (query.empty()) { |
| 242 OutputString("\"" + args[1] + "\" matches no targets.\n"); | 242 OutputString("\"" + args[1] + "\" matches no targets.\n"); |
| 243 return 0; | 243 return 0; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 cur_dep != dep_end; cur_dep++) | 283 cur_dep != dep_end; cur_dep++) |
| 284 results.insert(cur_dep->second); | 284 results.insert(cur_dep->second); |
| 285 } | 285 } |
| 286 OutputResultSet(results, files); | 286 OutputResultSet(results, files); |
| 287 } | 287 } |
| 288 | 288 |
| 289 return 0; | 289 return 0; |
| 290 } | 290 } |
| 291 | 291 |
| 292 } // namespace commands | 292 } // namespace commands |
| OLD | NEW |