https://github.com/slowki/clang_aspects
Clang related Bazel Aspects
https://github.com/slowki/clang_aspects
Last synced: 4 months ago
JSON representation
Clang related Bazel Aspects
- Host: GitHub
- URL: https://github.com/slowki/clang_aspects
- Owner: Slowki
- License: mit
- Created: 2022-08-03T04:25:58.000Z (almost 4 years ago)
- Default Branch: develop
- Last Pushed: 2022-08-03T04:27:13.000Z (almost 4 years ago)
- Last Synced: 2026-03-27T22:57:04.567Z (4 months ago)
- Language: Starlark
- Size: 4.88 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Clang-related Aspects
This package contains some (hacky) Bazel aspects for working with Clang tooling. It's not production ready - it's just
here to serve as an example for anyone who wants to make similiar aspects.
## Dependencies
- An `@llvm` repo
- bazel_skylib
- rules_cc
## Example `.bazelrc`
```
# Run clang-tidy over the given targets
build:clang-tidy --aspects=@clang_aspects//:clang_tidy.bzl%clang_tidy_aspect
build:clang-tidy --output_groups=clang_tidy
# Run clang-check over the given targets
build:clang-check --aspects=@clang_aspects//:clang_check.bzl%clang_check_aspect
build:clang-check --output_groups=clang_check
# Run clang-doc over the given targets
build:clang-doc --aspects=@clang_aspects//:clang_doc.bzl%clang_doc_aspect
build:clang-doc --output_groups=clang_doc
# Use -ftime-trace to emit `.json` files containing traces of compile times.
build:clang-time-trace --aspects=@clang_aspects//:clang_time_trace.bzl%clang_time_trace_aspect
build:clang-time-trace --output_groups=clang_time_trace
```