]> git.baikalelectronics.ru Git - kernel.git/commit
gen_compile_commands: move directory walk to a generator function
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 22 Aug 2020 14:56:14 +0000 (23:56 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 26 Aug 2020 15:44:33 +0000 (00:44 +0900)
commit144b4d0db6d459adc6ced9fb3e75d2a2d200ced0
treee537e1a977a50cb758f4f0da81ba979e03b5650e
parent511ed620c1d61cbcb10acd09ff75a5c0829c5653
gen_compile_commands: move directory walk to a generator function

Currently, this script walks under the specified directory (default to
the current directory), then parses all .cmd files found.

Split it into a separate helper function because the next commit will
add more helpers to pick up .cmd files associated with given file(s).

There is no point to build and return a huge list at once. I used a
generator so it works in the for-loop with less memory.

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