Relative "directory" field in compile_commands.json

I am setting up clangd for a C project. So far it works fine: I generated a compile_commands.json from my Makefile with compiledb, but now I have a problem: I want to have a relative “directory” field to keep the project directory portable. Replacing it with “./” makes clangd not index my files correctly anymore.

Any ideas?