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

Side by Side Diff: tools/gn/command_check.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/builder_unittest.cc ('k') | tools/gn/command_gen.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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "tools/gn/commands.h" 9 #include "tools/gn/commands.h"
10 #include "tools/gn/header_checker.h" 10 #include "tools/gn/header_checker.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 178
179 // Deliberately leaked to avoid expensive process teardown. 179 // Deliberately leaked to avoid expensive process teardown.
180 Setup* setup = new Setup(); 180 Setup* setup = new Setup();
181 if (!setup->DoSetup(args[0], false)) 181 if (!setup->DoSetup(args[0], false))
182 return 1; 182 return 1;
183 if (!setup->Run()) 183 if (!setup->Run())
184 return 1; 184 return 1;
185 185
186 std::vector<const Target*> all_targets = 186 std::vector<const Target*> all_targets =
187 setup->builder()->GetAllResolvedTargets(); 187 setup->builder().GetAllResolvedTargets();
188 188
189 bool filtered_by_build_config = false; 189 bool filtered_by_build_config = false;
190 std::vector<const Target*> targets_to_check; 190 std::vector<const Target*> targets_to_check;
191 if (args.size() > 1) { 191 if (args.size() > 1) {
192 // Compute the targets to check. 192 // Compute the targets to check.
193 std::vector<std::string> inputs(args.begin() + 1, args.end()); 193 std::vector<std::string> inputs(args.begin() + 1, args.end());
194 UniqueVector<const Target*> target_matches; 194 UniqueVector<const Target*> target_matches;
195 UniqueVector<const Config*> config_matches; 195 UniqueVector<const Config*> config_matches;
196 UniqueVector<const Toolchain*> toolchain_matches; 196 UniqueVector<const Toolchain*> toolchain_matches;
197 UniqueVector<SourceFile> file_matches; 197 UniqueVector<SourceFile> file_matches;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 header_checker->Run(to_check, force_check, &header_errors); 253 header_checker->Run(to_check, force_check, &header_errors);
254 for (size_t i = 0; i < header_errors.size(); i++) { 254 for (size_t i = 0; i < header_errors.size(); i++) {
255 if (i > 0) 255 if (i > 0)
256 OutputString("___________________\n", DECORATION_YELLOW); 256 OutputString("___________________\n", DECORATION_YELLOW);
257 header_errors[i].PrintToStdout(); 257 header_errors[i].PrintToStdout();
258 } 258 }
259 return header_errors.empty(); 259 return header_errors.empty();
260 } 260 }
261 261
262 } // namespace commands 262 } // namespace commands
OLDNEW
« no previous file with comments | « tools/gn/builder_unittest.cc ('k') | tools/gn/command_gen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698