summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorBenjamin Gray <bgray@linux.ibm.com>2023-07-19 05:19:12 +0200
committerMasahiro Yamada <masahiroy@kernel.org>2023-07-23 15:36:07 +0200
commit1c67921444bf68107f7901d5bcfce954efaa8754 (patch)
treed5a6e21633f36f36bf973617c5273b678ddf7622 /scripts
parentkconfig: gconfig: correct program name in help text (diff)
downloadlinux-1c67921444bf68107f7901d5bcfce954efaa8754.tar.xz
linux-1c67921444bf68107f7901d5bcfce954efaa8754.zip
gen_compile_commands: add assembly files to compilation database
Like C source files, tooling can find it useful to have the assembly source file compilation recorded. The .S extension appears to used across all architectures. Signed-off-by: Benjamin Gray <bgray@linux.ibm.com> Reviewed-by: Fangrui Song <maskray@google.com> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/clang-tools/gen_compile_commands.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py
index 15ba56527acd..a84cc5737c2c 100755
--- a/scripts/clang-tools/gen_compile_commands.py
+++ b/scripts/clang-tools/gen_compile_commands.py
@@ -19,7 +19,7 @@ _DEFAULT_OUTPUT = 'compile_commands.json'
_DEFAULT_LOG_LEVEL = 'WARNING'
_FILENAME_PATTERN = r'^\..*\.cmd$'
-_LINE_PATTERN = r'^savedcmd_[^ ]*\.o := (.* )([^ ]*\.c) *(;|$)'
+_LINE_PATTERN = r'^savedcmd_[^ ]*\.o := (.* )([^ ]*\.[cS]) *(;|$)'
_VALID_LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
# The tools/ directory adopts a different build system, and produces .cmd
# files in a different format. Do not support it.