[riot-commits] [RIOT-OS/RIOT] a07dac: build system: add new compile-commands make target

chrysn noreply at github.com
Wed Apr 14 18:10:50 CEST 2021


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: a07dac9ad1b0ec2175f6554bab1deb6e4674adcc
      https://github.com/RIOT-OS/RIOT/commit/a07dac9ad1b0ec2175f6554bab1deb6e4674adcc
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2021-04-14 (Wed, 14 Apr 2021)

  Changed paths:
    M Makefile.base
    M Makefile.include
    A dist/tools/compile_commands/README.md
    A dist/tools/compile_commands/compile_commands.py
    M doc/doxygen/src/getting-started.md

  Log Message:
  -----------
  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`.


  Commit: c99bb55e68b4ef91795924e61df44d22884c45b6
      https://github.com/RIOT-OS/RIOT/commit/c99bb55e68b4ef91795924e61df44d22884c45b6
  Author: chrysn <chrysn at fsfe.org>
  Date:   2021-04-14 (Wed, 14 Apr 2021)

  Changed paths:
    M Makefile.base
    M Makefile.include
    A dist/tools/compile_commands/README.md
    A dist/tools/compile_commands/compile_commands.py
    M doc/doxygen/src/getting-started.md

  Log Message:
  -----------
  Merge pull request #16129 from maribu/compile_commands_json

build system: add compile-commands target to generate compile_commands.json


Compare: https://github.com/RIOT-OS/RIOT/compare/a8e9fa6253bc...c99bb55e68b4


More information about the commits mailing list