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

Unified Diff: tools/gn/target.cc

Issue 301243002: Don't inherit source sets across static libs in GN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/target.h ('k') | tools/gn/target_unittest.cc » ('j') | 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 2ddbde91cf7fe964d76eb7a415bcdec7b7bed223..9bfae3593c32222bdd672ba382f9391701e0ac0b 100644
--- a/tools/gn/target.cc
+++ b/tools/gn/target.cc
@@ -177,8 +177,13 @@ void Target::PullDependentTargetInfo(std::set<const Config*>* unique_configs) {
dep->output_type() != EXECUTABLE) {
const std::set<const Target*> inherited = dep->inherited_libraries();
for (std::set<const Target*>::const_iterator i = inherited.begin();
- i != inherited.end(); ++i)
- inherited_libraries_.insert(*i);
+ i != inherited.end(); ++i) {
+ // Don't copy source sets across static library boundaries. The static
+ // library will include all the files from the source set.
+ if (!(dep->output_type() == STATIC_LIBRARY &&
+ (*i)->output_type() == SOURCE_SET))
+ inherited_libraries_.insert(*i);
+ }
// Inherited library settings.
all_lib_dirs_.append(dep->all_lib_dirs());
« 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