From cab2e9ebc2b9985ae0a2e5d6971ace170c2d5651 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 18 Jul 2016 08:17:02 +0200 Subject: Pick liba{}/libs{} before looking up cxx.export.* This way we can specify static library-specific defines which are necessary to handle DLL export. --- build2/cxx/utility.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'build2/cxx/utility.cxx') 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 () || t->is_a () || t->is_a ()) - append_lib_options (args, *t, var); + if (lib* l = t->is_a ()) + t = &link_member (*l, lo); // Pick one of the members. + + if (t->is_a () || t->is_a ()) + 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 () || t->is_a () || t->is_a ()) - hash_lib_options (csum, *t, var); + if (lib* l = t->is_a ()) + t = &link_member (*l, lo); // Pick one of the members. + + if (t->is_a () || t->is_a ()) + hash_lib_options (csum, *t, var, lo); } hash_options (csum, l, var); -- cgit v1.1