aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/types.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/cc/types.hxx')
-rw-r--r--build2/cc/types.hxx19
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;
+ };
}
}