mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tools/compile_commands: use -Wno-unknown-warning-option
... instead of manual filtering Some -Wwarning-type flags were removed because in combination with -Werror they caused clang to fail when the warning type was unknown. Rather than enumerating them (a manual process with the extra risk of leaving warnings disabled longer than necessary), this adds `-Wno-unknown-arning-option` which disables the warnings (that are becoming erors through -Werror) raised when a warning's name is unknown.
This commit is contained in:
parent
c3fa026226
commit
4fb9f46e62
@ -228,6 +228,9 @@ def generate_module_compile_commands(path, state, args):
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
if args.clangd:
|
||||
cdetails.cflags.append('-Wno-unknown-warning-option')
|
||||
|
||||
c_extra_includes = []
|
||||
cxx_extra_includes = []
|
||||
|
||||
@ -288,12 +291,13 @@ if __name__ == '__main__':
|
||||
help='Drop the given flag, if present (repeatable)')
|
||||
parser.add_argument('--clangd', default=False, action='store_const', const=True,
|
||||
help='Shorthand for --add-built-in-includes --add-libstdxx-includes ' +
|
||||
'and some CFLAG adjustments throughy --filter-out')
|
||||
'and some CFLAG adjustments throughy --filter-out, and ignores ' +
|
||||
'unknown warning flags')
|
||||
_args = parser.parse_args()
|
||||
if _args.clangd:
|
||||
_args.add_built_in_includes = True
|
||||
_args.add_libstdcxx_includes = True
|
||||
_args.filter_out = ['-Wformat-truncation', '-Wformat-overflow', '-mno-thumb-interwork',
|
||||
_args.filter_out = ['-mno-thumb-interwork',
|
||||
# Only even included for versions of GCC that support it
|
||||
'-malign-data=natural',
|
||||
# Only supported starting with clang 11
|
||||
|
Loading…
Reference in New Issue
Block a user