aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/operation.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-22 14:38:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-23 18:14:07 +0200
commit5035f4ef68922ac758b1e4734e67d73c9228010b (patch)
tree271fdd5b1d6e995a058d97aacb3ac90a538d9ff1 /libbuild2/operation.hxx
parent8793941652d6aa1c3d02b2f87f691e6d06254b7d (diff)
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.
Diffstat (limited to 'libbuild2/operation.hxx')
-rw-r--r--libbuild2/operation.hxx18
1 files changed, 10 insertions, 8 deletions
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 <libbuild2/utility.hxx>
#include <libbuild2/action.hxx>
-#include <libbuild2/variable.hxx>
-#include <libbuild2/prerequisite.hxx>
#include <libbuild2/target-state.hxx>
#include <libbuild2/export.hxx>
@@ -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<value, 1>;
+
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<opspec>&,
bool lifted,
@@ -295,11 +298,10 @@ namespace build2
return os << d.name;
}
- LIBBUILD2_SYMEXPORT extern butl::string_table<meta_operation_id,
- meta_operation_data>
- meta_operation_table;
+ using meta_operation_table = butl::string_table<meta_operation_id,
+ meta_operation_data>;
- LIBBUILD2_SYMEXPORT extern butl::string_table<operation_id> operation_table;
+ using operation_table = butl::string_table<operation_id>;
// These are "sparse" in the sense that we may have "holes" that
// are represented as NULL pointers. Also, lookup out of bounds