]> 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)
commit56e1764e80e401f68b7b192155c61efbddac754c
treee537e1a977a50cb758f4f0da81ba979e03b5650e
parentaf952d79ea32fc9efbd7cf11d1e76c4ef1afa6e9
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