aboutsummaryrefslogtreecommitdiff
path: root/build2/cxx/link.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/link.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/link.cxx')
-rw-r--r--build2/cxx/link.cxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/build2/cxx/link.cxx b/build2/cxx/link.cxx
index 002cd42..25e3650 100644
--- a/build2/cxx/link.cxx
+++ b/build2/cxx/link.cxx
@@ -878,13 +878,19 @@ namespace build2
ot.prerequisites.emplace_back (p.as_prerequisite (trace));
// Add our lib*{} prerequisites to the object file (see
- // cxx.export.poptions above for details). Note: no need
- // to go into group members.
+ // 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 start with this library.
+ // Note that we don't resolve lib{} to liba{}/libs{} here instead
+ // leaving it to whoever (e.g., the compile rule) will be needing
+ // cxx.export.*. One reason for doing it there is that the object
+ // target might be specified explicitly by the user in which case
+ // they will have to specify the set of lib{} prerequisites and it's
+ // much cleaner to do as lib{} rather than liba{}/libs{}.
+ //
+ // 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 start
+ // with this library.
//
for (prerequisite& p: group_prerequisites (t))
{