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

13 Commits

Author SHA1 Message Date
Marian Buschsieweke
dd19110e8a
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
2023-05-22 13:26:03 +02:00
Alain Péteut
25df307ea1 dist/tools: Use /usr/bin/env to lookup Python.
Fixes some Python scripts which didn't use `/usr/bin/env`.
2023-04-10 14:39:42 +02:00
Jan Henke
53c8ebc287
dist/tools/compile_commands: Fix interoperability with localized GCC
GCC supports localized outputs, depending on the currently set locale.
This broke the compile-commands target, as the regexes only match the
English output. By invoking the compiler explicitly with the C locale,
it ensures the expected English language output.
2022-12-13 18:48:43 +01:00
Marian Buschsieweke
e90975da6f
dist/tools/compile_commands: fix clangd mode with ESP32
In clangd mode drop a number of compiler flags not supported by LLVM.
2022-06-14 13:20:14 +02:00
Marian Buschsieweke
a5f52cbbb7
dist/tools/compile_commands: fix error handling
detect_includes_and_version_gcc() previously only detected the includes,
but has been extended to also return the version. This is done by
returning a tuple, with the first item being the list of include paths,
and the second being the version. In the error handling the script still
returns only an empty list of includes, but not an empty version. This
fixes the issue.
2022-06-14 12:32:22 +02:00
chrysn
6d3fb861c3 dist/compile_commands: Filter out GCC specific -misa-spec=2.2 2022-05-13 17:13:43 +02:00
Marian Buschsieweke
b42197f323
dist/tools/compile_commands: don't adds -nostdinc
This fixes unintended side affects on rust compilation, which currently
relies on this tool to generate appropriate flags.
2022-05-09 22:32:54 +02:00
Marian Buschsieweke
6e2f726f5e
dist/tools/compile_commands: fix clangd linting
This fixes bogus clangd linting errors for C11 stdatomic.h due to
incorrect order of header search paths and missing -nostdinc
2022-05-05 20:36:43 +02:00
chrysn
4fb9f46e62 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.
2022-01-27 09:10:49 +01:00
chrysn
c3fa026226 tools/compile_commands: Filter out -msmall-data-limit=8
It is not available in the libclang version currently shipped with
riotdocker.
2022-01-27 08:58:35 +01:00
chrysn
a72ee1fb03 compile_commands: Don't produce duplicate -c arguments 2021-12-16 13:29:31 +01:00
chrysn
d0ed537bae compile_commands: Filter out GCC-only -malign-data=natural 2021-12-16 13:29:30 +01:00
Marian Buschsieweke
a07dac9ad1
build system: add new compile-commands make target
By running make compile-commands a `compile_commands.json` in the RIOT base
directory. With the environment variable `COMPILE_COMMANDS` the path of
this file can be changed to a custom location.

The `compile_commands.json` will contain the exact compile command, but
as additional flag `-I/usr/$(TARGET)/include` is added to work around
`clangd` not being able to locate the newlib system headers. The
additional includes can be overwritten using the environment variable
`COMPILE_COMMANDS_EXTRA_INCLUDES`.
2021-04-14 14:51:46 +02:00