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

Unified Diff: tools/gn/target.cc

Issue 572893002: GN: Refine 'complete' static library handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/ninja_binary_target_writer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/target.cc
diff --git a/tools/gn/target.cc b/tools/gn/target.cc
index ba1e4b780610c995e49be094804a1d665c20290c..77d5fa8af673306afeb9c699ddfaf4c4b706d79b 100644
--- a/tools/gn/target.cc
+++ b/tools/gn/target.cc
@@ -244,8 +244,17 @@ void Target::PullDependentTargetInfo() {
if (!dep->IsFinal()) {
inherited_libraries_.Append(dep->inherited_libraries().begin(),
dep->inherited_libraries().end());
+ } else if (dep->complete_static_lib()) {
brettw 2014/09/16 16:46:02 I don't think there should have to be a separate s
brettw 2014/09/16 23:56:12 I get what's happening here. Can you add a comment
kal 2014/09/17 05:03:54 OK I will extend the comment here. The way its im
+ // Inherit final libraries through _complete_ static libraries.
+ for (size_t i = 0; i < dep->inherited_libraries().size(); i++) {
+ const Target* inherited = dep->inherited_libraries()[i];
+ if (inherited->IsFinal())
+ inherited_libraries_.push_back(inherited);
+ }
+ }
- // Inherited library settings.
+ // Library settings are always inherited across static library boundaries.
+ if (!dep->IsFinal() || dep->output_type() == STATIC_LIBRARY) {
all_lib_dirs_.append(dep->all_lib_dirs());
all_libs_.append(dep->all_libs());
}
« no previous file with comments | « tools/gn/ninja_binary_target_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698