From 219e00f3b8caec38a9c8fbb4d70e33455aba5a92 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 13 Oct 2022 09:00:11 +0200 Subject: Optimize by going straight to public variable pool where applicable --- libbuild2/test/init.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libbuild2/test') diff --git a/libbuild2/test/init.cxx b/libbuild2/test/init.cxx index f62ddcc..b7cf25f 100644 --- a/libbuild2/test/init.cxx +++ b/libbuild2/test/init.cxx @@ -33,7 +33,11 @@ namespace build2 // Enter module variables. Do it during boot in case they get assigned // in bootstrap.build. // - auto& vp (rs.var_pool ()); + // Most of the variables we enter are qualified so go straight for the + // public variable pool. + // + auto& vp (rs.var_pool (true /* public */)); + auto& pvp (rs.var_pool ()); // For `test` and `for_test`. common_data d { @@ -64,7 +68,7 @@ namespace build2 // The test variable is a name which can be a path (with the // true/false special values) or a target name. // - vp.insert ("test", variable_visibility::target), + pvp.insert ("test", variable_visibility::target), vp.insert ("test.options"), vp.insert ("test.arguments"), @@ -106,7 +110,7 @@ namespace build2 // This one is used by other modules/rules. // - vp.insert ("for_test", variable_visibility::prereq); + pvp.insert ("for_test", variable_visibility::prereq); // These are only used in testscript. // -- cgit v1.1