mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #17577 from chrysn-pull-requests/compile_commands-updates
tools/compile_commands: Update --clangd set
This commit is contained in:
commit
4f085222cf
11
dist/tools/compile_commands/compile_commands.py
vendored
11
dist/tools/compile_commands/compile_commands.py
vendored
@ -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,14 +291,16 @@ 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 ' +
|
||||
'--filter-out=-Wformat-truncation --filter-out=-Wformat-overflow ' +
|
||||
'--filter-out=-mno-thumb-interwork')
|
||||
'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
|
||||
'-msmall-data-limit=8',
|
||||
]
|
||||
generate_compile_commands(_args)
|
||||
|
Loading…
Reference in New Issue
Block a user