diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-26 07:34:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-26 07:34:15 +0200 |
commit | 8e0e8edb727a5367d991880b033eb13060f4c8eb (patch) | |
tree | 75916dbef9b7a0dc6ef0fa939b9f748fc353d5cc /libbuild2/context.cxx | |
parent | 113c43a42d20073428d46c04a1aa1cb305ea12d7 (diff) |
Make target types project-wide
Diffstat (limited to 'libbuild2/context.cxx')
-rw-r--r-- | libbuild2/context.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libbuild2/context.cxx b/libbuild2/context.cxx index 687e9aa..db46319 100644 --- a/libbuild2/context.cxx +++ b/libbuild2/context.cxx @@ -45,9 +45,11 @@ namespace build2 target_set targets; variable_pool var_pool; variable_overrides var_overrides; - variable_override_cache global_override_cache; function_map functions; + target_type_map global_target_types; + variable_override_cache global_override_cache; + data (context& c): scopes (c), targets (c), var_pool (&c /* global */) {} }; @@ -59,12 +61,13 @@ namespace build2 keep_going (kg), phase_mutex (*this), scopes (data_->scopes), - global_scope (create_global_scope (data_->scopes)), targets (data_->targets), var_pool (data_->var_pool), var_overrides (data_->var_overrides), - global_override_cache (data_->global_override_cache), - functions (data_->functions) + functions (data_->functions), + global_scope (create_global_scope (data_->scopes)), + global_target_types (data_->global_target_types), + global_override_cache (data_->global_override_cache) { tracer trace ("context"); @@ -217,7 +220,7 @@ namespace build2 // Register builtin target types. // { - target_type_map& t (gs.target_types); + target_type_map& t (data_->global_target_types); t.insert<file> (); t.insert<alias> (); |