[PATCH] D54952: [clangd] DO NOT SUBMIT. Draft interfaces for build system integration.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 27 08:20:29 PST 2018
ilya-biryukov created this revision.
ilya-biryukov added reviewers: klimek, sammccall.
Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric.
A proposal for the interface of the new build system integration.
Similar to CompilationDatabase, but will provide more functionality and live
in clangd instead of tooling until stabilized.
Main points of interest are:
- clangd::Integration is a user-facing API, it handles loading the proper build system integrations from the directory structure and notifying the clients about all changes. It implements clang::GlobalCompilationDatabase and is used by all of clangd to get compile commands, etc.
- clangd::BuildSystem interface is for build system implementations. It handles interactions with a single build system (initially only 'compile_commands.json', but we also plan to experiment with adding direct CMake or ninja support).
- The clangd::GlobalCompilationDatabase now also provides a VFS instance alongside the compile command. The idea is to allow build systems to overlay generated files, if they can need (this is Bazel-specific AFAIK). It is also the responsibility of the buildsystem to update any dependencies (e.g. the generated files) it knows about before providing the compile commands.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D54952
Files:
clangd/BuildSystem.h
clangd/BuildSystemPlugin.h
clangd/FSProvider.h
clangd/FSWatch.h
clangd/GlobalCompilationDatabase.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54952.175492.patch
Type: text/x-patch
Size: 10173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181127/a6d8ec1a/attachment.bin>
More information about the cfe-commits
mailing list