aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/minstall.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/minstall.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/minstall.py')
-rw-r--r--mesonbuild/minstall.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
index e61757b..27e9929 100644
--- a/mesonbuild/minstall.py
+++ b/mesonbuild/minstall.py
@@ -26,7 +26,8 @@ import typing as T
from . import build, coredata, environment
from .backend.backends import InstallData
-from .mesonlib import MesonException, Popen_safe, RealPathAction, is_windows, setup_vsenv, pickle_load, is_osx
+from .mesonlib import (MesonException, Popen_safe, RealPathAction, is_windows,
+ setup_vsenv, pickle_load, is_osx, OptionKey)
from .scripts import depfixer, destdir_join
from .scripts.meson_exe import run_exe
try:
@@ -816,7 +817,8 @@ def run(opts: 'ArgumentType') -> int:
sys.exit('Install data not found. Run this command in build directory root.')
if not opts.no_rebuild:
b = build.load(opts.wd)
- setup_vsenv(b.need_vsenv)
+ need_vsenv = T.cast('bool', b.environment.coredata.get_option(OptionKey('vsenv')))
+ setup_vsenv(need_vsenv)
backend = T.cast('str', b.environment.coredata.get_option(coredata.OptionKey('backend')))
if not rebuild_all(opts.wd, backend):
sys.exit(-1)