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

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

Issue 1494883002: GN: Makes GN output deterministic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 "tools/gn/commands.h" 5 #include "tools/gn/commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "tools/gn/builder.h" 8 #include "tools/gn/builder.h"
9 #include "tools/gn/filesystem_utils.h" 9 #include "tools/gn/filesystem_utils.h"
10 #include "tools/gn/item.h" 10 #include "tools/gn/item.h"
11 #include "tools/gn/label.h" 11 #include "tools/gn/label.h"
12 #include "tools/gn/label_pattern.h" 12 #include "tools/gn/label_pattern.h"
13 #include "tools/gn/pointer_set.h"
13 #include "tools/gn/setup.h" 14 #include "tools/gn/setup.h"
14 #include "tools/gn/standard_out.h" 15 #include "tools/gn/standard_out.h"
15 #include "tools/gn/target.h" 16 #include "tools/gn/target.h"
16 17
17 namespace commands { 18 namespace commands {
18 19
19 namespace { 20 namespace {
20 21
21 // Like above but the input string can be a pattern that matches multiple 22 // Like above but the input string can be a pattern that matches multiple
22 // targets. If the input does not parse as a pattern, prints and error and 23 // targets. If the input does not parse as a pattern, prints and error and
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 case TARGET_PRINT_LABEL: 488 case TARGET_PRINT_LABEL:
488 PrintTargetsAsLabels(indent, *targets); 489 PrintTargetsAsLabels(indent, *targets);
489 break; 490 break;
490 case TARGET_PRINT_OUTPUT: 491 case TARGET_PRINT_OUTPUT:
491 PrintTargetsAsOutputs(indent, *targets); 492 PrintTargetsAsOutputs(indent, *targets);
492 break; 493 break;
493 } 494 }
494 } 495 }
495 496
496 void FilterAndPrintTargetSet(bool indent, 497 void FilterAndPrintTargetSet(bool indent,
497 const std::set<const Target*>& targets) { 498 const PointerSet<const Target>& targets) {
498 std::vector<const Target*> target_vector(targets.begin(), targets.end()); 499 std::vector<const Target*> target_vector(targets.begin(), targets.end());
499 FilterAndPrintTargets(indent, &target_vector); 500 FilterAndPrintTargets(indent, &target_vector);
500 } 501 }
501 502
502 } // namespace commands 503 } // namespace commands
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698