gen_compile_commands: make -o option independent of -d option
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 22 Aug 2020 14:56:13 +0000 (23:56 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 26 Aug 2020 15:44:33 +0000 (00:44 +0900)
commit6fca36f1d82ad5bc385187f0aed93bbaefaa2172
tree91428edf9cfde9f5f51a2566f47636357a1c7640
parent0a7d376d04a3c84b503f1efecde8f9d9a7430269
gen_compile_commands: make -o option independent of -d option

Change the -o option independent of the -d option, which is I think
clearer behavior. Some people may like to use -d to specify a separate
output directory, but still output the compile_commands.py in the
source directory (unless the source tree is read-only) because it is
the default location Clang Tools search for the compilation database.

Also, move the default parameter to the default= argument of the
.add_argument().

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
scripts/gen_compile_commands.py