@@ -1025,17 +1025,10 @@ def _linkopts(ctx, additional_make_variable_substitutions, cc_toolchain):
10251025 fail ("in linkopts attribute of cc_library rule {}: Apple builds do not support statically linked binaries" .format (ctx .label ))
10261026 return tokens
10271027
1028- def _get_coverage_environment (ctx , cc_config , cc_toolchain ):
1028+ def _get_coverage_environment (ctx , cc_config , cc_toolchain , feature_configuration ):
10291029 if not ctx .configuration .coverage_enabled :
10301030 return {}
10311031
1032- feature_configuration = cc_common .configure_features (
1033- ctx = ctx ,
1034- cc_toolchain = cc_toolchain ,
1035- requested_features = ctx .features ,
1036- unsupported_features = ctx .disabled_features ,
1037- )
1038-
10391032 # buildifier: disable=unsorted-dict-items
10401033 env = {
10411034 "COVERAGE_GCOV_PATH" : _tool_path (cc_toolchain , "gcov" , feature_configuration , ACTION_NAMES .gcov ),
@@ -1050,15 +1043,15 @@ def _get_coverage_environment(ctx, cc_config, cc_toolchain):
10501043 env ["FDO_DIR" ] = cc_config .fdo_instrument ()
10511044 return env
10521045
1053- def _create_cc_instrumented_files_info (ctx , cc_config , cc_toolchain , metadata_files , virtual_to_original_headers = None ):
1046+ def _create_cc_instrumented_files_info (ctx , cc_config , cc_toolchain , feature_configuration , metadata_files , virtual_to_original_headers = None ):
10541047 source_extensions = extensions .CC_SOURCE + \
10551048 extensions .C_SOURCE + \
10561049 extensions .CC_HEADER + \
10571050 extensions .ASSEMBLER_WITH_C_PREPROCESSOR + \
10581051 extensions .ASSEMBLER
10591052 coverage_environment = {}
10601053 if ctx .configuration .coverage_enabled :
1061- coverage_environment = _get_coverage_environment (ctx , cc_config , cc_toolchain )
1054+ coverage_environment = _get_coverage_environment (ctx , cc_config , cc_toolchain , feature_configuration )
10621055 coverage_support_files = cc_toolchain ._coverage_files if ctx .configuration .coverage_enabled else depset ([])
10631056 info = coverage_common .instrumented_files_info (
10641057 ctx = ctx ,
0 commit comments