def _should_package_clang_runtime(ctx):
    """Returns whether the Clang runtime should be bundled."""

    # List of crosstool sanitizer features that require packaging some clang
    # runtime libraries.
    features_requiring_clang_runtime = {
        "asan": True,
        "tsan": True,
        "ubsan": True,
    }

    for feature in ctx.features:
        if feature in features_requiring_clang_runtime:
            return True
    return False