diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-08 18:51:45 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-08 18:51:45 +0200 |
commit | d52de69d635ce3fc840fc15b9db4f395d0763aed (patch) | |
tree | b8c445d6b0d06ae0422111ea45f930aab1ee8615 /build2/cc/utility.ixx | |
parent | 6d38ea067757974e0605b4cfb4c16731cdb2541e (diff) |
Implement rule chaining for modules
Diffstat (limited to 'build2/cc/utility.ixx')
-rw-r--r-- | build2/cc/utility.ixx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/build2/cc/utility.ixx b/build2/cc/utility.ixx index b15791a..d372dac 100644 --- a/build2/cc/utility.ixx +++ b/build2/cc/utility.ixx @@ -27,5 +27,23 @@ namespace build2 t.is_a<liba> () ? otype::a : otype::s; } + + inline compile_target_types + compile_types (otype t) + { + using namespace bin; + + const target_type* o (nullptr); + const target_type* m (nullptr); + + switch (t) + { + case otype::e: o = &obje::static_type; m = &bmie::static_type; break; + case otype::a: o = &obja::static_type; m = &bmia::static_type; break; + case otype::s: o = &objs::static_type; m = &bmis::static_type; break; + } + + return compile_target_types {*o, *m}; + } } } |