aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mtest.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-01-19 13:39:51 -0500
committerXavier Claessens <xclaesse@gmail.com>2023-03-29 09:33:41 -0400
commitb30cd5d2d587546eac8b560a8c311a52d69fb53e (patch)
treebd20ed04fbe5f5f63044e84a6f612602914217db /mesonbuild/mtest.py
parent5dc4fcae34ee3a5a3d47021f8ea8b2c5d3b14ea9 (diff)
downloadmeson-b30cd5d2d587546eac8b560a8c311a52d69fb53e.zip
meson-b30cd5d2d587546eac8b560a8c311a52d69fb53e.tar.gz
meson-b30cd5d2d587546eac8b560a8c311a52d69fb53e.tar.bz2
Make --vsenv a readonly builtin option
We need to remember its value when reconfiguring, but the Build object is not reused, only coredata is. This also makes CLI more consistent by allowing `-Dvsenv=true` syntax. Fixes: #11309
Diffstat (limited to 'mesonbuild/mtest.py')
-rw-r--r--mesonbuild/mtest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index 7685023..acf28a2 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -2096,7 +2096,8 @@ def run(options: argparse.Namespace) -> int:
return 1
b = build.load(options.wd)
- setup_vsenv(b.need_vsenv)
+ need_vsenv = T.cast('bool', b.environment.coredata.get_option(OptionKey('vsenv')))
+ setup_vsenv(need_vsenv)
if not options.no_rebuild:
backend = b.environment.coredata.get_option(OptionKey('backend'))