Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not validate options when finding non-matching #8372

Merged
merged 1 commit into from
Feb 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions mesonbuild/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2476,13 +2476,10 @@ def _redetect_machines(self):

# 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,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main(void) {
return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
project(
'invalid C standard overriden to valid one',
'c',
default_options : ['c_std=invalid99'],
)

exe = executable('main', 'main.c')
test('main', exe)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"matrix": {
"options": {
"c_std": [
{ "val": "c89" }
]
}
}
}