diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-02-16 14:09:34 -0800 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-02-17 14:51:26 +0200 |
commit | 867963f1315023673abbe3cc823eb6d332ed8f86 (patch) | |
tree | 5a62a34397b202c7b258665ae1bad43bd15eabc2 /mesonbuild/interpreter.py | |
parent | b6804bf49c68ca84c22f9f0c4d18732f15461847 (diff) | |
download | meson-867963f1315023673abbe3cc823eb6d332ed8f86.zip meson-867963f1315023673abbe3cc823eb6d332ed8f86.tar.gz meson-867963f1315023673abbe3cc823eb6d332ed8f86.tar.bz2 |
Do not validate options when finding non-matching
This is a) useless because it's only used to print which options are not
default, and b) harmful because it can result in cases where things
break, like in projects that set a standard that the chosen compiler
doesn't support, but the project (or some subset) can be built with a
different standard.
Fixes: #8360
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index f670aec..2bc1afb 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -2476,13 +2476,10 @@ class Interpreter(InterpreterBase): # TODO: Why is this in interpreter.py and not CoreData or Environment? def get_non_matching_default_options(self) -> T.Iterator[T.Tuple[str, str, coredata.UserOption]]: - env = self.environment for def_opt_name, def_opt_value in self.project_default_options.items(): cur_opt_value = self.coredata.options.get(def_opt_name) - if cur_opt_value is not None: - def_opt_value = env.coredata.validate_option_value(def_opt_name, def_opt_value) - if def_opt_value != cur_opt_value.value: - yield (str(def_opt_name), def_opt_value, cur_opt_value) + if cur_opt_value is not None and def_opt_value != cur_opt_value.value: + yield (str(def_opt_name), def_opt_value, cur_opt_value) def build_func_dict(self): self.funcs.update({'add_global_arguments': self.func_add_global_arguments, |