Skip to content

Commit 1c67921

Browse files
BenjaminGrayNp1masahir0y
authored andcommitted
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>
1 parent 30ebf2c commit 1c67921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/clang-tools/gen_compile_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
_DEFAULT_LOG_LEVEL = 'WARNING'
2020

2121
_FILENAME_PATTERN = r'^\..*\.cmd$'
22-
_LINE_PATTERN = r'^savedcmd_[^ ]*\.o := (.* )([^ ]*\.c) *(;|$)'
22+
_LINE_PATTERN = r'^savedcmd_[^ ]*\.o := (.* )([^ ]*\.[cS]) *(;|$)'
2323
_VALID_LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
2424
# The tools/ directory adopts a different build system, and produces .cmd
2525
# files in a different format. Do not support it.

0 commit comments

Comments
 (0)