Skip to content

sanitizers: add a merged env target for multi-sanitizer oci_image builds #30

Description

@RSingh1511

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions