1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

dist/tools/compile_commands: fix clangd mode with ESP32

In clangd mode drop a number of compiler flags not supported by LLVM.
This commit is contained in:
Marian Buschsieweke 2022-06-14 13:19:07 +02:00
parent 9827e573c0
commit e90975da6f
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94

View File

@ -318,11 +318,21 @@ if __name__ == '__main__':
if _args.clangd:
_args.add_built_in_includes = True
_args.add_libstdcxx_includes = True
_args.filter_out = ['-mno-thumb-interwork',
# Only even included for versions of GCC that support it
'-misa-spec=2.2',
'-malign-data=natural',
# Only supported starting with clang 11
'-msmall-data-limit=8',
]
flags = [
'-mno-thumb-interwork',
# Only even included for versions of GCC that
# support it
'-misa-spec=2.2',
'-malign-data=natural',
# Only supported starting with clang 11
'-msmall-data-limit=8',
# not supported by clang, see
# https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Xtensa-Options.html
'-mtext-section-literals',
'-fstrict-volatile-bitfields',
# it's called -mlong-calls in LLVM, but we don't need it for clangd
# as we do not generate code anyway
'-mlongcalls',
]
_args.filter_out.extend(flags)
generate_compile_commands(_args)