Hello GCC developers, I am trying to generate a compile_commands.json file for the GCC source code. This file is very useful for various development tools and IDE integrations. Since GCC uses a Makefile-based build system, I attempted to use bear (https://github.com/rizsotto/Bear) to capture the compilation commands. My workflow was as follows:
../configure --enable-languages=c,c++,fortran --disable-bootstrap --disable-multilib bear -- make -j$(nproc) However, this approach did not produce the expected compile_commands.json file with the correct compilation commands for the source files. Could you please advise on the recommended way to generate compile_commands.json for the GCC source tree? Is this something commonly done by developers working on GCC, and if so, what is the typical method? Thank you for your time and assistance. Best regards, Yuao