Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ build:macos --host_cxxopt=-std=c++14
# the project separately.
build --experimental_convenience_symlinks=ignore

# Generate compile_commands.json for tools that require it.
run:compile-commands --experimental_convenience_symlinks=normal @hedron_compile_commands//:refresh_all

# We mirror critical tarballs from several sources in case the canonical source
# is temporarily unavailable, e.g., github.com being down. This option and flag
# automatically rewrites the URLs.
Expand Down
8 changes: 8 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,11 @@ git_repository(
commit = "496018e020cf0a7d813a2b5a9d246ec55340a7ed",
remote = "https://github.com/erenon/bazel_clang_tidy.git",
)

# FIXME: switch to hedronvision/bazel-compile-commands-extractor once https://github.com/hedronvision/bazel-compile-commands-extractor/pull/219 lands
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
remote = "https://github.com/mikael-s-persson/bazel-compile-commands-extractor.git",
commit = "02d15621b528efd877f5d5657c4b738523a0eb17",
)
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ bigtable-emulator -p <port>
clang-format -i -style=file -assume-filename=.clang-format **/*.cc **/*.h
```

### `compile_commands.json`
If you need to generate `compile_commands.json` for your tooling, run:
```shell
bazel run --config=compile-commands
```

## Contributing changes

See [`CONTRIBUTING.md`](/CONTRIBUTING.md) for details on how to contribute to
Expand Down