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/bin/rule.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'build/bin/rule.cxx') diff --git a/build/bin/rule.cxx b/build/bin/rule.cxx index 06fe72e..22b7bc2 100644 --- a/build/bin/rule.cxx +++ b/build/bin/rule.cxx @@ -77,6 +77,22 @@ namespace build build::match (a, *t.so); } + // Search and match prerequisite libraries and add them to the + // prerequisite targets. While we never execute this list + // ourselves (see perform() below), this is necessary to make + // the exported options machinery work for the library chains. + // See cxx.export.*-related code in cxx/rule.cxx for details. + // + for (prerequisite& p: group_prerequisites (t)) + { + if (p.is_a () || p.is_a () || p.is_a ()) + { + target& pt (search (p)); + build::match (a, pt); + t.prerequisite_targets.push_back (&pt); + } + } + return &perform; } -- cgit v1.1