Skip to content

Commit

Permalink
metrowerks: Pass warning flags to all subtools
Browse files Browse the repository at this point in the history
The "on" option is documented as passing the warning flags to all
subtools, and implies "most".
The default in the majority of projects is -warnings on,nocmdline, which
I'd take to be the equivalent of -Wall -Wextra, there isn't really an
inbetween.
  • Loading branch information
mid-kid authored and jpakkane committed Sep 29, 2024
1 parent aed67bb commit ddc03e5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions mesonbuild/compilers/mixins/metrowerks.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,12 @@ def __init__(self) -> None:
self.base_options = {
OptionKey(o) for o in ['b_pch', 'b_ndebug']}

default_warn_args: T.List[str] = []
self.warn_args: T.Dict[str, T.List[str]] = {
'0': ['-w', 'off'],
'1': default_warn_args,
'2': default_warn_args + ['-w', 'most'],
'3': default_warn_args + ['-w', 'all'],
'everything': default_warn_args + ['-w', 'full']}
'0': ['-warnings', 'off'],
'1': [],
'2': ['-warnings', 'on,nocmdline'],
'3': ['-warnings', 'on,all'],
'everything': ['-warnings', 'on,full']}

def depfile_for_object(self, objfile: str) -> T.Optional[str]:
# Earlier versions of these compilers do not support specifying
Expand Down

0 comments on commit ddc03e5

Please sign in to comment.