From dfb51bc816cde2cb345f8a0300205e6ac95a2065 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 30 Mar 2020 15:30:08 +0200 Subject: Switch to project variable visibility by default --- libbuild2/bin/init.cxx | 57 ++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 30 deletions(-) (limited to 'libbuild2/bin') diff --git a/libbuild2/bin/init.cxx b/libbuild2/bin/init.cxx index 25d5c39..c97cadf 100644 --- a/libbuild2/bin/init.cxx +++ b/libbuild2/bin/init.cxx @@ -50,45 +50,42 @@ namespace build2 assert (first); - // Enter variables. Note: some overridable, some not. + // Enter variables. // // Target is a string and not target_triplet because it can be // specified by the user. // auto& vp (rs.var_pool ()); - const auto vis_tgt (variable_visibility::target); - const auto vis_prj (variable_visibility::project); - - vp.insert ("config.bin.target", true); - vp.insert ("config.bin.pattern", true); + vp.insert ("config.bin.target"); + vp.insert ("config.bin.pattern"); // Library types to build. // - vp.insert ("config.bin.lib", true); + vp.insert ("config.bin.lib"); // Library types to use (in priority order). // - vp.insert ("config.bin.exe.lib", true); - vp.insert ("config.bin.liba.lib", true); - vp.insert ("config.bin.libs.lib", true); + vp.insert ("config.bin.exe.lib"); + vp.insert ("config.bin.liba.lib"); + vp.insert ("config.bin.libs.lib"); // The rpath[_link].auto flag controls automatic rpath behavior, for // example, addition of rpaths for prerequisite libraries (see the cc // module for an example). Default is true. // - vp.insert ("config.bin.rpath", true); - vp.insert ("config.bin.rpath.auto", true); + vp.insert ("config.bin.rpath"); + vp.insert ("config.bin.rpath.auto"); - vp.insert ("config.bin.rpath_link", true); - vp.insert ("config.bin.rpath_link.auto", true); + vp.insert ("config.bin.rpath_link"); + vp.insert ("config.bin.rpath_link.auto"); - vp.insert ("config.bin.prefix", true); - vp.insert ("config.bin.suffix", true); - vp.insert ("config.bin.lib.prefix", true); - vp.insert ("config.bin.lib.suffix", true); - vp.insert ("config.bin.exe.prefix", true); - vp.insert ("config.bin.exe.suffix", true); + vp.insert ("config.bin.prefix"); + vp.insert ("config.bin.suffix"); + vp.insert ("config.bin.lib.prefix"); + vp.insert ("config.bin.lib.suffix"); + vp.insert ("config.bin.exe.prefix"); + vp.insert ("config.bin.exe.suffix"); vp.insert ("bin.lib"); @@ -102,7 +99,7 @@ namespace build2 vp.insert ("bin.rpath_link"); vp.insert ("bin.rpath_link.auto"); - // Link whole archive. Note: non-overridable with target visibility. + // Link whole archive. Note: with target visibility. // // The lookup semantics is as follows: we first look for a prerequisite- // specific value, then for a target-specific value in the library being @@ -118,7 +115,7 @@ namespace build2 // // If unspecified, defaults to false for liba{} and to true for libu*{}. // - vp.insert ("bin.whole", vis_tgt); + vp.insert ("bin.whole", variable_visibility::target); vp.insert ("bin.exe.prefix"); vp.insert ("bin.exe.suffix"); @@ -131,11 +128,11 @@ namespace build2 // only used for platform-independent versions (for platforms-specific // versions we can always derive the pattern automatically). // - vp.insert ("bin.lib.load_suffix", vis_prj); - vp.insert ("bin.lib.load_suffix_pattern", vis_prj); + vp.insert ("bin.lib.load_suffix"); + vp.insert ("bin.lib.load_suffix_pattern"); - vp.insert> ("bin.lib.version", vis_prj); - vp.insert ("bin.lib.version_pattern", vis_prj); + vp.insert> ("bin.lib.version"); + vp.insert ("bin.lib.version_pattern"); return true; } @@ -580,8 +577,8 @@ namespace build2 vp.insert ("bin.ar.path"); vp.insert ("bin.ranlib.path"); - vp.insert ("config.bin.ar", true); - vp.insert ("config.bin.ranlib", true); + vp.insert ("config.bin.ar"); + vp.insert ("config.bin.ranlib"); } // Configuration. @@ -745,7 +742,7 @@ namespace build2 auto& vp (rs.var_pool ()); vp.insert ("bin.ld.path"); - vp.insert ("config.bin.ld", true); + vp.insert ("config.bin.ld"); } // Configuration. @@ -881,7 +878,7 @@ namespace build2 auto& vp (rs.var_pool ()); vp.insert ("bin.rc.path"); - vp.insert ("config.bin.rc", true); + vp.insert ("config.bin.rc"); } // Configuration. -- cgit v1.1