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

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

Issue 2152413002: GN: don't write separate files for non-binary targets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years, 4 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_gen.cc ('k') | tools/gn/command_refs.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <algorithm> 5 #include <algorithm>
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/label_pattern.h" 10 #include "tools/gn/label_pattern.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 UniqueVector<const Toolchain*> toolchain_matches; 90 UniqueVector<const Toolchain*> toolchain_matches;
91 UniqueVector<SourceFile> file_matches; 91 UniqueVector<SourceFile> file_matches;
92 if (!ResolveFromCommandLineInput(setup, inputs, all_toolchains, 92 if (!ResolveFromCommandLineInput(setup, inputs, all_toolchains,
93 &target_matches, &config_matches, 93 &target_matches, &config_matches,
94 &toolchain_matches, &file_matches)) 94 &toolchain_matches, &file_matches))
95 return 1; 95 return 1;
96 matches.insert(matches.begin(), 96 matches.insert(matches.begin(),
97 target_matches.begin(), target_matches.end()); 97 target_matches.begin(), target_matches.end());
98 } else if (all_toolchains) { 98 } else if (all_toolchains) {
99 // List all resolved targets. 99 // List all resolved targets.
100 matches = setup->builder()->GetAllResolvedTargets(); 100 matches = setup->builder().GetAllResolvedTargets();
101 } else { 101 } else {
102 // List all resolved targets in the default toolchain. 102 // List all resolved targets in the default toolchain.
103 for (auto* target : setup->builder()->GetAllResolvedTargets()) { 103 for (auto* target : setup->builder().GetAllResolvedTargets()) {
104 if (target->settings()->is_default()) 104 if (target->settings()->is_default())
105 matches.push_back(target); 105 matches.push_back(target);
106 } 106 }
107 } 107 }
108 FilterAndPrintTargets(false, &matches); 108 FilterAndPrintTargets(false, &matches);
109 return 0; 109 return 0;
110 } 110 }
111 111
112 } // namespace commands 112 } // namespace commands
OLDNEW
« no previous file with comments | « tools/gn/command_gen.cc ('k') | tools/gn/command_refs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698