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.
score_cpp_policiesprovides 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_envtarget insanitizers/BUILD.bazelthat 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
genrulelogic across downstream repositories.