aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/utility.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-05-31 16:35:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-05-31 16:36:49 +0200
commit9ae4897cfe935598333a5f709e967fefc4c161aa (patch)
tree16bfbcb21a10994a29db602f5cb77a0a50627bdf /build2/cc/utility.ixx
parentb2fc1fb4a13ffa58640333a3909dd0e53bd21995 (diff)
C++ modules work: add target types
Diffstat (limited to 'build2/cc/utility.ixx')
-rw-r--r--build2/cc/utility.ixx14
1 files changed, 9 insertions, 5 deletions
diff --git a/build2/cc/utility.ixx b/build2/cc/utility.ixx
index bc9cd05..b15791a 100644
--- a/build2/cc/utility.ixx
+++ b/build2/cc/utility.ixx
@@ -7,20 +7,24 @@ namespace build2
namespace cc
{
inline otype
- compile_type (const target& t)
+ compile_type (const target& t, bool mod)
{
+ using namespace bin;
+
return
- t.is_a<bin::obje> () ? otype::e :
- t.is_a<bin::obja> () ? otype::a :
+ t.is_a (mod ? bmie::static_type : obje::static_type) ? otype::e :
+ t.is_a (mod ? bmia::static_type : obja::static_type) ? otype::a :
otype::s;
}
inline otype
link_type (const target& t)
{
+ using namespace bin;
+
return
- t.is_a<exe> () ? otype::e :
- t.is_a<bin::liba> () ? otype::a :
+ t.is_a<exe> () ? otype::e :
+ t.is_a<liba> () ? otype::a :
otype::s;
}
}