From dd19110e8adfd0f9cfd8173677da07fd43383825 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Wed, 17 May 2023 12:16:59 +0200 Subject: [PATCH] dist/tools/compile_commands: add another workaround Filter out GCC only `--param=min-pagesize=0` in `clangd` mode. This fixes compilation of rust applications, that now fails with: thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("error: argument unused during compilation: '--param=min-pagesize=0' [-Wunused-command-line-argument]\n")', /home/maribu/.cargo/git/checkouts/rust-riot-sys-d12733b89271907c/b4bd4bd/build.rs:224:10 --- dist/tools/compile_commands/compile_commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dist/tools/compile_commands/compile_commands.py b/dist/tools/compile_commands/compile_commands.py index e9e313c367..49930239c4 100755 --- a/dist/tools/compile_commands/compile_commands.py +++ b/dist/tools/compile_commands/compile_commands.py @@ -335,6 +335,8 @@ if __name__ == '__main__': # it's called -mlong-calls in LLVM, but we don't need it for clangd # as we do not generate code anyway '-mlongcalls', + # GCC specific diagnostics: Tell GCC address space starts at 0 + '--param=min-pagesize=0', ] _args.filter_out.extend(flags) generate_compile_commands(_args)