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

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

Issue 2940873002: Implement tracking of BUILD.gn files used to define target, toolchain or (Closed)
Patch Set: Fix compilation after rebase. Created 3 years, 5 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/target.h ('k') | tools/gn/target_generator.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 (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/target.h" 5 #include "tools/gn/target.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 check". 266 check".
267 267
268 A target's "data_deps" are guaranteed to be built whenever the target is 268 A target's "data_deps" are guaranteed to be built whenever the target is
269 built, but the ordering is not defined. The meaning of this is dependencies 269 built, but the ordering is not defined. The meaning of this is dependencies
270 required at runtime. Currently data deps will be complete before the target 270 required at runtime. Currently data deps will be complete before the target
271 is linked, but this is not semantically guaranteed and this is undesirable 271 is linked, but this is not semantically guaranteed and this is undesirable
272 from a build performance perspective. Since we hope to change this in the 272 from a build performance perspective. Since we hope to change this in the
273 future, do not rely on this behavior. 273 future, do not rely on this behavior.
274 )"; 274 )";
275 275
276 Target::Target(const Settings* settings, const Label& label) 276 Target::Target(const Settings* settings,
277 : Item(settings, label), 277 const Label& label,
278 const InputFileSet& input_files)
279 : Item(settings, label, input_files),
278 output_type_(UNKNOWN), 280 output_type_(UNKNOWN),
279 output_prefix_override_(false), 281 output_prefix_override_(false),
280 output_extension_set_(false), 282 output_extension_set_(false),
281 all_headers_public_(true), 283 all_headers_public_(true),
282 check_includes_(true), 284 check_includes_(true),
283 complete_static_lib_(false), 285 complete_static_lib_(false),
284 testonly_(false), 286 testonly_(false),
285 toolchain_(nullptr) { 287 toolchain_(nullptr) {}
286 }
287 288
288 Target::~Target() { 289 Target::~Target() {
289 } 290 }
290 291
291 // static 292 // static
292 const char* Target::GetStringForOutputType(OutputType type) { 293 const char* Target::GetStringForOutputType(OutputType type) {
293 switch (type) { 294 switch (type) {
294 case UNKNOWN: 295 case UNKNOWN:
295 return "unknown"; 296 return "unknown";
296 case GROUP: 297 case GROUP:
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file); 854 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file);
854 // Check object files (much slower and very rare) only if the "normal" 855 // Check object files (much slower and very rare) only if the "normal"
855 // output check failed. 856 // output check failed.
856 consider_object_files = !check_data_deps; 857 consider_object_files = !check_data_deps;
857 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, 858 if (!EnsureFileIsGeneratedByDependency(this, out_file, true,
858 consider_object_files, 859 consider_object_files,
859 check_data_deps, &seen_targets)) 860 check_data_deps, &seen_targets))
860 g_scheduler->AddUnknownGeneratedInput(this, source); 861 g_scheduler->AddUnknownGeneratedInput(this, source);
861 } 862 }
862 } 863 }
OLDNEW
« no previous file with comments | « tools/gn/target.h ('k') | tools/gn/target_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698