OLD | NEW |
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 <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 check". | 268 check". |
269 | 269 |
270 A target's "data_deps" are guaranteed to be built whenever the target is | 270 A target's "data_deps" are guaranteed to be built whenever the target is |
271 built, but the ordering is not defined. The meaning of this is dependencies | 271 built, but the ordering is not defined. The meaning of this is dependencies |
272 required at runtime. Currently data deps will be complete before the target | 272 required at runtime. Currently data deps will be complete before the target |
273 is linked, but this is not semantically guaranteed and this is undesirable | 273 is linked, but this is not semantically guaranteed and this is undesirable |
274 from a build performance perspective. Since we hope to change this in the | 274 from a build performance perspective. Since we hope to change this in the |
275 future, do not rely on this behavior. | 275 future, do not rely on this behavior. |
276 )"; | 276 )"; |
277 | 277 |
278 Target::Target(const Settings* settings, const Label& label) | 278 Target::Target(const Settings* settings, |
279 : Item(settings, label), | 279 const Label& label, |
| 280 const InputFileSet& input_files) |
| 281 : Item(settings, label, input_files), |
280 output_type_(UNKNOWN), | 282 output_type_(UNKNOWN), |
281 output_prefix_override_(false), | 283 output_prefix_override_(false), |
282 output_extension_set_(false), | 284 output_extension_set_(false), |
283 all_headers_public_(true), | 285 all_headers_public_(true), |
284 check_includes_(true), | 286 check_includes_(true), |
285 complete_static_lib_(false), | 287 complete_static_lib_(false), |
286 testonly_(false), | 288 testonly_(false), |
287 toolchain_(nullptr) { | 289 toolchain_(nullptr) {} |
288 } | |
289 | 290 |
290 Target::~Target() { | 291 Target::~Target() { |
291 } | 292 } |
292 | 293 |
293 // static | 294 // static |
294 const char* Target::GetStringForOutputType(OutputType type) { | 295 const char* Target::GetStringForOutputType(OutputType type) { |
295 switch (type) { | 296 switch (type) { |
296 case UNKNOWN: | 297 case UNKNOWN: |
297 return "unknown"; | 298 return "unknown"; |
298 case GROUP: | 299 case GROUP: |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file); | 856 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file); |
856 // Check object files (much slower and very rare) only if the "normal" | 857 // Check object files (much slower and very rare) only if the "normal" |
857 // output check failed. | 858 // output check failed. |
858 consider_object_files = !check_data_deps; | 859 consider_object_files = !check_data_deps; |
859 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, | 860 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, |
860 consider_object_files, | 861 consider_object_files, |
861 check_data_deps, &seen_targets)) | 862 check_data_deps, &seen_targets)) |
862 g_scheduler->AddUnknownGeneratedInput(this, source); | 863 g_scheduler->AddUnknownGeneratedInput(this, source); |
863 } | 864 } |
864 } | 865 } |
OLD | NEW |