From 33ef0312f43646ab3dd9ff95430d70d24bc1d701 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 18 Jun 2015 10:11:27 +0200 Subject: Make cxx.export.* machinery work for library chains --- build/cxx/rule.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'build/cxx') diff --git a/build/cxx/rule.cxx b/build/cxx/rule.cxx index d5a9b9c..4fce59a 100644 --- a/build/cxx/rule.cxx +++ b/build/cxx/rule.cxx @@ -839,20 +839,18 @@ namespace build // pt->prerequisites.emplace_back (cp); - // Add our imported lib*{} prerequisites to the object file (see + // Add our lib*{} prerequisites to the object file (see // cxx.export.poptions above for details). // + // Initially, we were only adding imported libraries, but + // there is a problem with this approach: the non-imported + // library might depend on the imported one(s) which we + // will never "see" unless we add this library as well. + // for (prerequisite& p: group_prerequisites (t)) { if (p.is_a () || p.is_a () || p.is_a ()) - { - // Check that it is imported, that is its root scope differs - // from ours. - // - if (p.dir.absolute () && // Imported is always absolute. - scopes.find (p.dir).root_scope () != root) - pt->prerequisites.emplace_back (p); - } + pt->prerequisites.emplace_back (p); } build::match (a, *ot); -- cgit v1.1