Commit Graph

8 Commits

Author SHA1 Message Date
Sam McCall 9336389b0f [Tooling] Use FixedCompilationDatabase when `compile_flags.txt` is found.
Summary:
This is an alternative to JSONCompilationDatabase for simple projects that
don't use a build system such as CMake.
(You can also drop one in ~, to make your tools use e.g. C++11 by default)

There's no facility for varying flags per-source-file or per-machine.
Possibly this could be accommodated backwards-compatibly using cpp, but even if
not the simplicity seems worthwhile for the cases that are addressed.

Tested with clangd, works great! (requires clangd restart)

Reviewers: klimek

Subscribers: ilya-biryukov, cfe-commits

Differential Revision: https://reviews.llvm.org/D39799

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317777 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09 10:37:39 +00:00
Joerg Sonnenberger 5ca7f4286d Extend CompilationDatabase by a field for the output filename
In bigger projects like an Operating System, the same source code is
often compiled in slightly different ways. This could be the difference
between PIC and non-PIC code for static vs dynamic libraries, it could
also be the difference between size optimised versions of tools for
ramdisk images. At the moment, the compilation database has no way to
distinguish such cases. As first step, add a field in the JSON format
for it and process it accordingly.

Differential Revision: https://reviews.llvm.org/D27138


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288436 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 23:37:45 +00:00
Joerg Sonnenberger 1ae91827bc Document the arguments form of commands.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287926 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-25 14:14:43 +00:00
Dmitri Gribenko 74149595de Documentation: fix escaping in JSON example
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173950 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 17:58:39 +00:00
Dmitri Gribenko d96d949cad Documentation: add a link to Bear, a tool to help with JSON DB
Patch by Laszlo Nagy


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173949 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 17:58:14 +00:00
Sean Silva 159cc9e6f6 docs: Fix up HTML links to proper reST links.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171382 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-02 13:07:47 +00:00
Dmitri Gribenko 97555a1368 Documentation: random cleanups. Use monospaced font where appropriate,
highlight console output with "code-block:: console", etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170276 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-15 21:10:51 +00:00
Sean Silva 93ca0217a2 docs: More reST conversion.
Sorry for the large commit, but it is much faster to convert in batches.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170067 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-13 01:10:46 +00:00