aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/minit.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/minit.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/minit.py')
-rw-r--r--mesonbuild/minit.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/minit.py b/mesonbuild/minit.py
index 53e0aa9..7cca9cf 100644
--- a/mesonbuild/minit.py
+++ b/mesonbuild/minit.py
@@ -187,7 +187,8 @@ def run(options: 'argparse.Namespace') -> int:
raise SystemExit
b = build.load(options.builddir)
- vsenv_active = mesonlib.setup_vsenv(b.need_vsenv)
+ need_vsenv = T.cast('bool', b.environment.coredata.get_option(mesonlib.OptionKey('vsenv')))
+ vsenv_active = mesonlib.setup_vsenv(need_vsenv)
if vsenv_active:
mlog.log(mlog.green('INFO:'), 'automatically activated MSVC compiler environment')