aboutsummaryrefslogtreecommitdiff
path: root/build/cxx/link
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-12 13:46:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-12 13:46:07 +0200
commitad4120afce8c7bc4001fc0173a0ff7611ec0198d (patch)
treeebbc31d03feda96560df437247b63206489a1139 /build/cxx/link
parentdd4a389117812f0d3b45473d87214d67d0cb4a3a (diff)
Implement installation of prerequisite shared libraries
Diffstat (limited to 'build/cxx/link')
-rw-r--r--build/cxx/link22
1 files changed, 22 insertions, 0 deletions
diff --git a/build/cxx/link b/build/cxx/link
index 5d3d29e..5a5aafa 100644
--- a/build/cxx/link
+++ b/build/cxx/link
@@ -12,6 +12,8 @@
#include <build/types>
#include <build/rule>
+#include <build/bin/target>
+
namespace build
{
namespace cxx
@@ -30,6 +32,26 @@ namespace build
static link instance;
+ public:
+ enum class type {e, a, so};
+ enum class order {a, so, a_so, so_a};
+
+ static type
+ link_type (target& t)
+ {
+ return t.is_a<bin::exe> ()
+ ? type::e
+ : (t.is_a<bin::liba> () ? type::a : type::so);
+ }
+
+ static order
+ link_order (target&);
+
+ // Determine the library member (liba or libso) to link.
+ //
+ static target&
+ link_member (bin::lib&, order);
+
private:
friend class compile;