| 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 // Copy public configs from all dependencies into the list of configs | 345 // Copy public configs from all dependencies into the list of configs |
| 346 // applying to this target (configs_). | 346 // applying to this target (configs_). |
| 347 PullDependentTargetConfigs(); | 347 PullDependentTargetConfigs(); |
| 348 | 348 |
| 349 // Copies public dependencies' public configs to this target's public | 349 // Copies public dependencies' public configs to this target's public |
| 350 // configs. These configs have already been applied to this target by | 350 // configs. These configs have already been applied to this target by |
| 351 // PullDependentTargetConfigs above, along with the public configs from | 351 // PullDependentTargetConfigs above, along with the public configs from |
| 352 // private deps. This step re-exports them as public configs for targets that | 352 // private deps. This step re-exports them as public configs for targets that |
| 353 // depend on this one. | 353 // depend on this one. |
| 354 for (const auto& dep : public_deps_) { | 354 for (const auto& dep : public_deps_) { |
| 355 if (dep.ptr->toolchain() == toolchain()) { | 355 public_configs_.Append(dep.ptr->public_configs().begin(), |
| 356 public_configs_.Append(dep.ptr->public_configs().begin(), | 356 dep.ptr->public_configs().end()); |
| 357 dep.ptr->public_configs().end()); | |
| 358 } | |
| 359 } | 357 } |
| 360 | 358 |
| 361 // Copy our own libs and lib_dirs to the final set. This will be from our | 359 // Copy our own libs and lib_dirs to the final set. This will be from our |
| 362 // target and all of our configs. We do this specially since these must be | 360 // target and all of our configs. We do this specially since these must be |
| 363 // inherited through the dependency tree (other flags don't work this way). | 361 // inherited through the dependency tree (other flags don't work this way). |
| 364 // | 362 // |
| 365 // This needs to happen after we pull dependent target configs for the | 363 // This needs to happen after we pull dependent target configs for the |
| 366 // public config's libs to be included here. And it needs to happen | 364 // public config's libs to be included here. And it needs to happen |
| 367 // before pulling the dependent target libs so the libs are in the correct | 365 // before pulling the dependent target libs so the libs are in the correct |
| 368 // order (local ones first, then the dependency's). | 366 // order (local ones first, then the dependency's). |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file); | 853 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file); |
| 856 // Check object files (much slower and very rare) only if the "normal" | 854 // Check object files (much slower and very rare) only if the "normal" |
| 857 // output check failed. | 855 // output check failed. |
| 858 consider_object_files = !check_data_deps; | 856 consider_object_files = !check_data_deps; |
| 859 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, | 857 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, |
| 860 consider_object_files, | 858 consider_object_files, |
| 861 check_data_deps, &seen_targets)) | 859 check_data_deps, &seen_targets)) |
| 862 g_scheduler->AddUnknownGeneratedInput(this, source); | 860 g_scheduler->AddUnknownGeneratedInput(this, source); |
| 863 } | 861 } |
| 864 } | 862 } |
| OLD | NEW |