1
0
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:
chrysn 2022-01-27 14:29:26 +01:00 committed by GitHub
commit 4f085222cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)