This change adds compile_commands*.json to .gitignore. The purpose is to make
sure no one would accidentally include their own workspace leftover into a
Sponsored by: The FreeBSD Foundation
khng300_gmail.com on Sep 21 2020, 4:23 PM.Authored by
compile_commands.json is a JSON flat file containing the compiler invocation arguments. The main consumers of that file has mainly been those using libclang. Usually this file is generated by cmake, meson or ninja -t. Despite currently we do not have an official way to generate compile_commands.json, one could still use devel/bear for the purpose. The simplest example is to invoke the following:
cd freebsd-src; bear -a make buildworld buildkernel
And after the jobs are finished, you could find compile_commands.json sit in the current directory.