| 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 "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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |