Where is the generated compilation database "compile_commands.json" after building with scons?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kidinashell

According to the following github issue https://github.com/godotengine/godot/issues/39883
while building godot from source, a compilation database (compile_commands.json) should be built with it. But I can’t find it anywhere.
I’m not talking about the dry run that is mentioned in the issue itself, but more the fact, that it’s mentioned that a database should be generated after fully building the whole project, which I did.
Anybody any insight on this? Thank you very much in advance.

:bust_in_silhouette: Reply From: kidinashell

Gonna answer my own question instead of removing it, should someone search for the same thing.

Even though it is commented in the SConstruct config file, that to generate the compilation database scons version 3.1.1+ is needed. That comment should not be taken for granted and even in the follow up configuration it is checked for scons version 4.0.0 before using the compiledb tool.

So long story short: Make sure you’re environment does have at least scons version 4.0.0