From fdd4a925b28291bbcc492e75c3fc427476ee1be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20G=C3=B6rtz?= Date: Thu, 24 Aug 2023 18:17:56 +0200 Subject: [PATCH] Add tool to generate compile_commands.json Clang's compile command database is used by a multitude of tool to discover the parameters a certain file was compiled with. Tools that support compile_commands.json as an input include industry standard tools like Visual Studio Code and clang-tidy. With the compiledb command available in the build container the compile_commands.json database can effortlessly be generated by just prepending "compiledb" infront of the make call for example compiledb make app_name=custom_app target_board=pca10040 --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index b9381d9..71ecddc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,9 @@ RUN apt-get update \ # Install pycryptodome package needed for scratchpad image generation RUN pip3 install pycryptodome==3.16.0 +# Tool to generate clang's "compile_command.json" for make-based projects +RUN pip3 install compiledb==0.10.1 + WORKDIR /home/${user} # Install Arm compiler