aboutsummaryrefslogtreecommitdiff
path: root/build/bin
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-18 10:11:27 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-18 10:11:27 +0200
commit33ef0312f43646ab3dd9ff95430d70d24bc1d701 (patch)
treec67fa9081431da5faddbfb62eb275b9ca11dc1f3 /build/bin
parent0490097565744b4a37de230b4d23d89902d15596 (diff)
Make cxx.export.* machinery work for library chains
Diffstat (limited to 'build/bin')
-rw-r--r--build/bin/rule.cxx16
1 files changed, 16 insertions, 0 deletions
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<lib> () || p.is_a<liba> () || p.is_a<libso> ())
+ {
+ target& pt (search (p));
+ build::match (a, pt);
+ t.prerequisite_targets.push_back (&pt);
+ }
+ }
+
return &perform;
}