Reuse Starlark default features in CcToolchainInfo Copybara Import from https://github.com/bazelbuild/rules_cc/pull/807 BEGIN_PUBLIC Reuse Starlark default features in CcToolchainInfo (#807) Use `CcToolchainConfigInfo._default_features_and_action_configs` when initializing the C++ toolchain provider. `create_cc_toolchain_config_info` already computes this ordered list in Starlark, so the remaining `CcToolchainFeatures.default_features_and_action_configs()` Java call is unnecessary. Validation: `buildifier -mode=check cc/private/rules_impl/cc_toolchain_provider_helper.bzl` and 89 passing C++ common, binary, and library analysis tests. Closes #807 END_PUBLIC COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_cc/pull/807 from dzbarsky:codex/starlarkify-remaining-default-features 1db2303734a850191f90df7385c391e32dfcbf99 PiperOrigin-RevId: 960753794 Change-Id: Iae8fdf9ef5779599a8126f1143a16d02e282dd28
diff --git a/cc/private/rules_impl/cc_toolchain_provider_helper.bzl b/cc/private/rules_impl/cc_toolchain_provider_helper.bzl index 1470797..c748c2e 100644 --- a/cc/private/rules_impl/cc_toolchain_provider_helper.bzl +++ b/cc/private/rules_impl/cc_toolchain_provider_helper.bzl
@@ -158,7 +158,7 @@ # we fall back to below so the guard in tool_path returns true # when those action_configs are declared. feature_configuration = toolchain_features.configure_features( - requested_features = toolchain_features.default_features_and_action_configs() + [ + requested_features = toolchain_config_info._default_features_and_action_configs + [ ACTION_NAMES.c_compile, ACTION_NAMES.cpp_link_static_library, ACTION_NAMES.cpp_link_executable,