Skip to content

Commit

Permalink
Maintain bw compatibility for requesting bad options. Closes: #14255.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpakkane committed Feb 18, 2025
1 parent 31da328 commit be719bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mesonbuild/interpreter/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,11 @@ def func_get_option(self, nodes: mparser.BaseNode, args: T.Tuple[str, T.Optional
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:
Expand Down

0 comments on commit be719bb

Please sign in to comment.