Chromium Code Reviews| 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()); |
| } |