From bf959a7fc119f9156c4b84c9d0a10900d9153f8d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 27 Jul 2017 14:45:05 +0200 Subject: Initial infrastructure for utility libraries --- build2/cc/types.hxx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'build2/cc/types.hxx') diff --git a/build2/cc/types.hxx b/build2/cc/types.hxx index 3170942..417370f 100644 --- a/build2/cc/types.hxx +++ b/build2/cc/types.hxx @@ -61,6 +61,17 @@ namespace build2 // enum class otype {e, a, s}; + struct ltype + { + otype type; + bool utility; // True for utility libraries. + + bool executable () const {return type == otype::e || !utility;} + bool library () const {return type != otype::e || utility;} + bool static_library () const {return type == otype::a || utility;} + bool shared_library () const {return type == otype::s && !utility;} + }; + // Compile target types. // struct compile_target_types @@ -72,6 +83,14 @@ namespace build2 // Library link order. // enum class lorder {a, s, a_s, s_a}; + + // Link information: output type and link order. + // + struct linfo + { + otype type; + lorder order; + }; } } -- cgit v1.1