From 737877e62467b924eea0a43eab68258b0c13db78 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Feb 2017 09:48:12 +0200 Subject: Add MT-safe variable_cache, use for variable overrides --- build2/scope | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'build2/scope') diff --git a/build2/scope b/build2/scope index 64aaf24..2b86200 100644 --- a/build2/scope +++ b/build2/scope @@ -177,6 +177,18 @@ namespace build2 // variable_type_map target_vars; + // Variable override cache (project root and global scope only). + // + // The key is the variable plus the innermost (scope-wise) variable map to + // which this override applies. See find_override() for details. + // + // Note: since it can be modified on any lookup (including during the + // execute phase), the cache is protected by its own mutex shard. + // + mutable + variable_cache> + override_cache; + // Meta/operations supported by this project (set on the root // scope only). // -- cgit v1.1