From 5035f4ef68922ac758b1e4734e67d73c9228010b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Aug 2019 14:38:57 +0200 Subject: Introduce notion of build context All non-const global state is now in class context and we can now have multiple independent builds going on at the same time. --- libbuild2/operation.hxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'libbuild2/operation.hxx') diff --git a/libbuild2/operation.hxx b/libbuild2/operation.hxx index 86f93c6..520b37b 100644 --- a/libbuild2/operation.hxx +++ b/libbuild2/operation.hxx @@ -11,8 +11,6 @@ #include #include -#include -#include #include #include @@ -21,10 +19,15 @@ namespace build2 { class location; class scope; - class target_key; class target; + class target_key; + class context; + class include_type; struct prerequisite_member; + class value; + using values = small_vector; + struct opspec; // Meta-operation info. @@ -275,7 +278,7 @@ namespace build2 // If lifted is true then the operation name in opspec is bogus (has // been lifted) and the default/empty name should be assumed instead. // - using process_func = const string& (const variable_overrides&, + using process_func = const string& (context&, values&, vector_view&, bool lifted, @@ -295,11 +298,10 @@ namespace build2 return os << d.name; } - LIBBUILD2_SYMEXPORT extern butl::string_table - meta_operation_table; + using meta_operation_table = butl::string_table; - LIBBUILD2_SYMEXPORT extern butl::string_table operation_table; + using operation_table = butl::string_table; // These are "sparse" in the sense that we may have "holes" that // are represented as NULL pointers. Also, lookup out of bounds -- cgit v1.1