eclipse-score / eclipse-score/score_cpp_policies
sanitizers: add a merged env target for multi-sanitizer oci_image builds
- Dominant language
- Starlark
- Stars
- 0
- Forks
- 4
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 4
Description
`score_cpp_policies` provides separate env files for each sanitizer (ASAN, UBSAN, LSAN, TSAN). However, oci_image.env only supports a single env file.
This becomes an issue for valid multi-sanitizer setups like asan_ubsan_lsan, where multiple env files exist but only one can be used. Currently, each consumer works around this by writing a custom genrule to concatenate the env files—I ran into this while integrating sanitizers into the communication repo.
Can we add a `merged_absolute_env` target in `sanitizers/BUILD.bazel` that uses select() over the existing flags (asan_on, ubsan_on, lsan_on, tsan_on) and produces a single merged env file?
This should only cover valid combinations already allowed by the mutually exclusive logic (e.g. asan_ubsan_lsan, tsan, and single-sanitizer cases), not all possible flag combinations.
This would remove duplicated `genrule` logic across downstream repositories.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.