summaryrefslogtreecommitdiff
path: root/scripts/clang-tools/gen_compile_commands.py
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2025-04-07 14:47:40 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2025-04-07 15:35:48 +0300
commit1afba39f9305fe4061a4e70baa6ebab9d41459da (patch)
tree67e7ed686bd75adc559025870151c4de6d649ced /scripts/clang-tools/gen_compile_commands.py
parentfbe43810d563a293e3de301141d33caf1f5d5c5a (diff)
parent0af2f6be1b4281385b618cb86ad946eded089ac8 (diff)
downloadlinux-1afba39f9305fe4061a4e70baa6ebab9d41459da.tar.xz
Merge drm/drm-next into drm-misc-next
Backmerging to get v6.15-rc1 into drm-misc-next. Also fixes a build issue when enabling CONFIG_DRM_SCHED_KUNIT_TEST. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
-rwxr-xr-xscripts/clang-tools/gen_compile_commands.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py
index e4fb686dfaa9..96e6e46ad1a7 100755
--- a/scripts/clang-tools/gen_compile_commands.py
+++ b/scripts/clang-tools/gen_compile_commands.py
@@ -167,10 +167,10 @@ def process_line(root_directory, command_prefix, file_path):
root_directory or file_directory.
"""
# The .cmd files are intended to be included directly by Make, so they
- # escape the pound sign '#', either as '\#' or '$(pound)' (depending on the
- # kernel version). The compile_commands.json file is not interepreted
- # by Make, so this code replaces the escaped version with '#'.
- prefix = command_prefix.replace(r'\#', '#').replace('$(pound)', '#')
+ # escape the pound sign '#' as '$(pound)'. The compile_commands.json file
+ # is not interepreted by Make, so this code replaces the escaped version
+ # with '#'.
+ prefix = command_prefix.replace('$(pound)', '#')
# Return the canonical path, eliminating any symbolic links encountered in the path.
abs_path = os.path.realpath(os.path.join(root_directory, file_path))