diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-14 13:06:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-14 13:06:38 +0200 |
commit | 57abb0703ec640fdcd0b0ac165f742bbc34df533 (patch) | |
tree | ec0fc9b3f23b2ed34e354978788384ee08be8035 /build2/cc/types.hxx | |
parent | 700f2e7c4be9c8caa0ac0fcd58b1a0ce505e33fa (diff) |
Next installment in C++ modules saga: module search, re-export support
Diffstat (limited to 'build2/cc/types.hxx')
-rw-r--r-- | build2/cc/types.hxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/build2/cc/types.hxx b/build2/cc/types.hxx index 59ea67f..17f6b96 100644 --- a/build2/cc/types.hxx +++ b/build2/cc/types.hxx @@ -8,10 +8,30 @@ #include <build2/types.hxx> #include <build2/utility.hxx> +#include <build2/target-type.hxx> + namespace build2 { namespace cc { + // Translation unit information (currently modules). + // + struct module_import + { + string name; + bool exported; // True if re-exported (export import M;). + size_t score; // See compile::search_modules(). + }; + + using module_imports = vector<module_import>; + + struct translation_unit + { + string module_name; // Not empty if a module unit. + bool module_interface; // True if a module interface unit. + cc::module_imports module_imports; // Imported modules. + }; + // Compiler language. // enum class lang {c, cxx}; @@ -26,6 +46,14 @@ namespace build2 // enum class otype {e, a, s}; + // Compile target types. + // + struct compile_target_types + { + const target_type& obj; + const target_type& bmi; + }; + // Library link order. // enum class lorder {a, s, a_s, s_a}; |