[PATCH] Allow compile_commands.json files in subdirectories

Yung, Douglas douglas_yung at playstation.sony.com
Thu Mar 19 01:20:29 PDT 2015


In the top-level .gitignore file of the llvm project, there is an entry in the .gitignore file to ignore the file compile_commands.json. This was added by David Blaikie in 162305 to ignore the compile_commands.json that may be present at the root of the LLVM source tree. The problem with how it was done though is that it is excluding compile_commands.json files anywhere in the LLVM source tree. In our case, we included the clang extra user tools in our repository under tools/clang/tools/extra, which contains 3 instances of the file compile_commands.json under tools/clang/tools/extra which were being ignored causing tests to fail due to this missing file. The proposed fix as seen below is to simply restrict the ignoring of compile_commands.json to an instance at the root of the LLVM source tree.

Douglas Yung


Index: .gitignore
--- .gitignore    (revision 232698)
+++ .gitignore    (working copy)
@@ -37,7 +37,7 @@

# Directories to ignore (do not add trailing '/'s, they skip symlinks).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150319/fa7823dd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gitignore.patch
Type: application/octet-stream
Size: 429 bytes
Desc: gitignore.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150319/fa7823dd/attachment.obj>

More information about the llvm-commits mailing list