aboutsummaryrefslogtreecommitdiff
path: root/build2/cxx/utility.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-07-18 08:17:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-07-18 08:17:02 +0200
commitcab2e9ebc2b9985ae0a2e5d6971ace170c2d5651 (patch)
tree1f6bc8e4dd4ffd0a8098eaf9e2de9933f624ad09 /build2/cxx/utility.cxx
parentdb3534da1bcbf286df7ac4c8736f5c5157399ced (diff)
Pick liba{}/libs{} before looking up cxx.export.*
This way we can specify static library-specific defines which are necessary to handle DLL export.
Diffstat (limited to 'build2/cxx/utility.cxx')
-rw-r--r--build2/cxx/utility.cxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/build2/cxx/utility.cxx b/build2/cxx/utility.cxx
index cf9c4d0..7aae6ac 100644
--- a/build2/cxx/utility.cxx
+++ b/build2/cxx/utility.cxx
@@ -73,28 +73,34 @@ namespace build2
}
void
- append_lib_options (cstrings& args, target& l, const char* var)
+ append_lib_options (cstrings& args, target& l, const char* var, lorder lo)
{
using namespace bin;
for (target* t: l.prerequisite_targets)
{
- if (t->is_a<lib> () || t->is_a<liba> () || t->is_a<libs> ())
- append_lib_options (args, *t, var);
+ if (lib* l = t->is_a<lib> ())
+ t = &link_member (*l, lo); // Pick one of the members.
+
+ if (t->is_a<liba> () || t->is_a<libs> ())
+ append_lib_options (args, *t, var, lo);
}
append_options (args, l, var);
}
void
- hash_lib_options (sha256& csum, target& l, const char* var)
+ hash_lib_options (sha256& csum, target& l, const char* var, lorder lo)
{
using namespace bin;
for (target* t: l.prerequisite_targets)
{
- if (t->is_a<lib> () || t->is_a<liba> () || t->is_a<libs> ())
- hash_lib_options (csum, *t, var);
+ if (lib* l = t->is_a<lib> ())
+ t = &link_member (*l, lo); // Pick one of the members.
+
+ if (t->is_a<liba> () || t->is_a<libs> ())
+ hash_lib_options (csum, *t, var, lo);
}
hash_options (csum, l, var);