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

Side by Side Diff: tools/gn/command_refs.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_ls.cc ('k') | tools/gn/setup.h » ('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 <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
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
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
OLDNEW
« no previous file with comments | « tools/gn/command_ls.cc ('k') | tools/gn/setup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698