bazelbuild / bazelbuild/bazel

An example of how to create a C++ compilation database is needed

Open
#13,976 2 comments 0 reactions 0 assignees View on GitHub
help wanted P3 team-Documentation team-Rules-CPP type: documentation (cleanup)
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 16h
Merged PRs (30d)
72

Description

### Description of the problem / feature request:

Please provide a definitive example of how to create a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) for a Bazel-based C++ project.

### Feature requests: what underlying problem are you trying to solve with this feature?

There are numerous IDEs that rely on [clang language server](https://clangd.llvm.org/) (which requires compilation database for precise source indexing) to implement code browsing / code completion features for C++.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing Bazel's existing C++ documentation and the linked compilation database and clangd references. Add a definitive example for generating a compilation database in a Bazel-based C++ project, with enough context for IDE and language-server users to follow it. Done means the example is documented and can be followed successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, developer-experience, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.