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

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

Issue 2140363002: GN: Fix ordering of public and all dep configs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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_unittest.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 <algorithm> 9 #include <algorithm>
10 10
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 const Tool* tool = toolchain_->GetTool(*computed_tool_type); 417 const Tool* tool = toolchain_->GetTool(*computed_tool_type);
418 if (!tool) 418 if (!tool)
419 return false; // Tool does not apply for this toolchain.file. 419 return false; // Tool does not apply for this toolchain.file.
420 420
421 // Figure out what output(s) this compiler produces. 421 // Figure out what output(s) this compiler produces.
422 SubstitutionWriter::ApplyListToCompilerAsOutputFile( 422 SubstitutionWriter::ApplyListToCompilerAsOutputFile(
423 this, source, tool->outputs(), outputs); 423 this, source, tool->outputs(), outputs);
424 return !outputs->empty(); 424 return !outputs->empty();
425 } 425 }
426 426
427 void Target::PullDependentTargetConfigsFrom(const Target* dep) {
428 MergeAllDependentConfigsFrom(dep, &configs_, &all_dependent_configs_);
429 MergePublicConfigsFrom(dep, &configs_);
430 }
431
432 void Target::PullDependentTargetConfigs() { 427 void Target::PullDependentTargetConfigs() {
433 for (const auto& pair : GetDeps(DEPS_LINKED)) 428 for (const auto& pair : GetDeps(DEPS_LINKED))
434 PullDependentTargetConfigsFrom(pair.ptr); 429 MergeAllDependentConfigsFrom(pair.ptr, &configs_, &all_dependent_configs_);
430 for (const auto& pair : GetDeps(DEPS_LINKED))
431 MergePublicConfigsFrom(pair.ptr, &configs_);
435 } 432 }
436 433
437 void Target::PullDependentTargetLibsFrom(const Target* dep, bool is_public) { 434 void Target::PullDependentTargetLibsFrom(const Target* dep, bool is_public) {
438 // Direct dependent libraries. 435 // Direct dependent libraries.
439 if (dep->output_type() == STATIC_LIBRARY || 436 if (dep->output_type() == STATIC_LIBRARY ||
440 dep->output_type() == SHARED_LIBRARY || 437 dep->output_type() == SHARED_LIBRARY ||
441 dep->output_type() == SOURCE_SET) 438 dep->output_type() == SOURCE_SET)
442 inherited_libraries_.Append(dep, is_public); 439 inherited_libraries_.Append(dep, is_public);
443 440
444 if (dep->output_type() == SHARED_LIBRARY) { 441 if (dep->output_type() == SHARED_LIBRARY) {
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file); 760 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file);
764 // Check object files (much slower and very rare) only if the "normal" 761 // Check object files (much slower and very rare) only if the "normal"
765 // output check failed. 762 // output check failed.
766 consider_object_files = !check_data_deps; 763 consider_object_files = !check_data_deps;
767 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, 764 if (!EnsureFileIsGeneratedByDependency(this, out_file, true,
768 consider_object_files, 765 consider_object_files,
769 check_data_deps, &seen_targets)) 766 check_data_deps, &seen_targets))
770 g_scheduler->AddUnknownGeneratedInput(this, source); 767 g_scheduler->AddUnknownGeneratedInput(this, source);
771 } 768 }
772 } 769 }
OLDNEW
« no previous file with comments | « tools/gn/target.h ('k') | tools/gn/target_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698