aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/variable.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-09-02 11:31:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-09-02 11:31:25 +0200
commit171b0e3a3b6f5bde0489c0e12c679fcefdeca54f (patch)
tree654518124cc827f2a62b749d89e632709a1131c1 /libbuild2/variable.cxx
parente2e2001260406bcfa0c636e00be3bc34808f8968 (diff)
Don't consider aliasing in variable override lookup
Diffstat (limited to 'libbuild2/variable.cxx')
-rw-r--r--libbuild2/variable.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbuild2/variable.cxx b/libbuild2/variable.cxx
index d84945f..0cf6528 100644
--- a/libbuild2/variable.cxx
+++ b/libbuild2/variable.cxx
@@ -1721,7 +1721,7 @@ namespace build2
const variable_map empty_variable_map (nullptr /* context */);
auto variable_map::
- lookup (const variable& var, bool typed) const ->
+ lookup (const variable& var, bool typed, bool aliased) const ->
pair<const value_data*, const variable&>
{
const variable* v (&var);
@@ -1739,7 +1739,8 @@ namespace build2
break;
}
- v = v->aliases;
+ if (aliased)
+ v = v->aliases;
} while (v != &var && v != nullptr);