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/link.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'build2/cxx/link.cxx') 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)) { -- cgit v1.1