aboutsummaryrefslogtreecommitdiff
path: root/build2/variable.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/variable.cxx')
-rw-r--r--build2/variable.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/build2/variable.cxx b/build2/variable.cxx
index 8695623..16fbe74 100644
--- a/build2/variable.cxx
+++ b/build2/variable.cxx
@@ -922,9 +922,12 @@ namespace build2
bool uv (v != nullptr && var.visibility != *v);
// In the global pool existing variables can only be updated during
- // serial load.
+ // the same load generation or during serial execution.
//
- assert (!global_ || !(ut || uv) || model_lock == nullptr);
+ assert (!global_ ||
+ !(ut || uv) ||
+ load_generation == 0 ||
+ var.generation == load_generation);
// Update type?
//
@@ -1012,7 +1015,8 @@ namespace build2
move (n),
t,
nullptr,
- v != nullptr ? *v : variable_visibility::normal}));
+ v != nullptr ? *v : variable_visibility::normal,
+ load_generation}));
variable& r (p.first->second);
@@ -1034,6 +1038,8 @@ namespace build2
bool o,
variable_visibility v)
{
+ assert (!global_ || phase == run_phase::load);
+
size_t pn (p.size ());
size_t w (p.find ('*'));