summaryrefslogtreecommitdiff
path: root/scripts/clang-tools
diff options
context:
space:
mode:
authorBenjamin Gray <bgray@linux.ibm.com>2023-07-19 13:19:12 +1000
committerMasahiro Yamada <masahiroy@kernel.org>2023-07-23 22:36:07 +0900
commit1c67921444bf68107f7901d5bcfce954efaa8754 (patch)
treed5a6e21633f36f36bf973617c5273b678ddf7622 /scripts/clang-tools
parent30ebf2ce70888d8fdd1986e8e6d509dd2d227985 (diff)
downloadlwn-1c67921444bf68107f7901d5bcfce954efaa8754.tar.gz
lwn-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/clang-tools')
-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.