From 91ebb94be4b815d2cced79d049cf71a82e15f717 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 11 Mar 2022 17:34:07 -0800 Subject: [PATCH] Add _lcov_merger attribute to test rules As of bazel 5.1 this can be used as a late bound attribute https://github.com/bazelbuild/bazel/commit/14d8be0e8ec07aabb6c4497555f712dac5720a5f This alleviates the concerns from https://github.com/bazelbuild/rules_apple/pull/691 and allows users to use this feature, and avoid having to pass `LCOV_MERGER` in the environment manually --- apple/internal/rule_factory.bzl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apple/internal/rule_factory.bzl b/apple/internal/rule_factory.bzl index db2caf6d4d..00c69585b6 100644 --- a/apple/internal/rule_factory.bzl +++ b/apple/internal/rule_factory.bzl @@ -175,6 +175,13 @@ AppleTestRunnerInfo provider. cfg = "exec", default = Label("@build_bazel_apple_support//tools:coverage_support"), ), + "_lcov_merger": attr.label( + default = configuration_field( + fragment = "coverage", + name = "output_generator", + ), + cfg = "exec", + ), } def _common_binary_linking_attrs(deps_cfg, product_type):