aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2025-02-18 13:37:04 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2025-02-18 13:37:04 +0200
commitb17253723e72422ebc6f01d02b298eeae7cc0bd3 (patch)
tree2c0fde0e05df324c5ef51069aea8697c2522399b
parenta18b0346035f4a2821e3d355d7d3a458923742c9 (diff)
downloadmeson-optionfallback.zip
meson-optionfallback.tar.gz
meson-optionfallback.tar.bz2
Maintain bw compatibility for requesting bad options. Closes: #14255.optionfallback
-rw-r--r--mesonbuild/interpreter/interpreter.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 9caf2be..3f670c0 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -1087,6 +1087,11 @@ class Interpreter(InterpreterBase, HoldableObject):
value_object, value = self.coredata.optstore.get_option_from_meson_file(options.OptionKey(optname, self.subproject))
except KeyError:
fallback = kwargs.get('fallback', None)
+ if fallback is None and optname == 'b_vscrt':
+ mlog.deprecation(textwrap.dedent('''Due to a bug it was possible to request nonexisting b_ options.
+ To maintain backwards compatibility this still works, but will become a hard error in the future.
+ You should update your build files to use the "fallback" keyword argument in these cases.'''))
+ fallback = 'if-release'
if fallback is not None:
return P_OBJ.OptionString(fallback, f'{{{optname}}}')
if self.subproject: