diff --git a/mesonbuild/modules/features/module.py b/mesonbuild/modules/features/module.py index 0be6af06c8b7..a6f357b3f65b 100644 --- a/mesonbuild/modules/features/module.py +++ b/mesonbuild/modules/features/module.py @@ -371,15 +371,12 @@ def fail_result(fail_reason: str, is_disabled: bool = False values: List[ConflictAttr] = getattr(fet, attr) accumulate_values = test_result[attr] # type: ignore for conflict in values: - if not conflict.match: - accumulate_values.append(conflict.val) - continue conflict_vals: List[str] = [] # select the acc items based on the match new_acc: List[str] = [] for acc in accumulate_values: # not affected by the match so we keep it - if not conflict.match.match(acc): + if not (conflict.match and conflict.match.match(acc)): new_acc.append(acc) continue # no filter so we totaly escape it @@ -396,7 +393,7 @@ def fail_result(fail_reason: str, is_disabled: bool = False continue conflict_vals.append(conflict.mjoin.join(filter_val)) new_acc.append(conflict.val + conflict.mjoin.join(conflict_vals)) - test_result[attr] = new_acc # type: ignore + accumulate_values = test_result[attr] = new_acc # type: ignore test_args = compiler.has_multi_arguments args = test_result['args']