bazelbuild / bazelbuild/rules_cc
Additional output files/groups from actions
- Dominant language
- Starlark
- Stars
- 247
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
We use a coverage tool [Bullseye](https://bullseye.com/) which provides an additional coverage file when you compile/link with their compiler/linker shims.
We currently shim the compiler/linker and zip the output into one file to get caching working with this tool, however we would prefer to declare an extra output in the toolchain when we are using the coverage toolchain.
I think what we would want to do is:
Tell bazel about the bullseye compiler wrapper and specify via data its reliance on the original compiler. Specify there is an:
```
additional_output_groups = {
"coverage_files": ["$(executable_name).cov"],
}
```
Then I think we can just use `cc_arg` as normal with make variable substitutions.
After that we can use aspects to easily gather the additional output_groups and merge the .cov files.
Additionally I think this can help support other compiler features which aren't just produce and object file and produce a executable. There are plenty of additional Microsoft CL features for example.
Contributor guide
Research direction
No files or tests are named. Start by tracing the toolchain declaration and the existing compiler/linker output handling, then examine how aspects gather output groups. Done means a coverage toolchain can declare the Bullseye .cov output and aspects can collect and merge those files without shimming and zipping the outputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100