diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-27 14:45:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-27 14:45:05 +0200 |
commit | bf959a7fc119f9156c4b84c9d0a10900d9153f8d (patch) | |
tree | d19b96238f58e305d936d186901edd1cf98e0c93 /build2/cc/types.hxx | |
parent | 24f74ea70a19ccd7bcb489853fc73a972ab8638f (diff) |
Initial infrastructure for utility libraries
Diffstat (limited to 'build2/cc/types.hxx')
-rw-r--r-- | build2/cc/types.hxx | 19 |
1 files changed, 19 insertions, 0 deletions
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; + }; } } |