Update _header_modules_feature in cc_toolchain_config.bzl to match prod crosstool behavior. Update _header_modules_feature so that header_modules implies header_module_compile and requires use_header_modules (rather than implying use_header_modules), matching the prod crosstool configuration. Enable _use_header_modules_feature by default and register FEATURE_NAMES.use_header_modules in the features dictionary. BEGIN_PUBLIC Update _header_modules_feature in cc_toolchain_config.bzl to match prod crosstool behavior. END_PUBLIC #proto_library_starlark_migration PiperOrigin-RevId: 966674919 Change-Id: Iad67e50ee41b3323f0ab770f85475d0ff5a3335c
diff --git a/tests/cc/testutil/toolchains/cc_toolchain_config.bzl b/tests/cc/testutil/toolchains/cc_toolchain_config.bzl index f712751..50fefe6 100644 --- a/tests/cc/testutil/toolchains/cc_toolchain_config.bzl +++ b/tests/cc/testutil/toolchains/cc_toolchain_config.bzl
@@ -157,7 +157,8 @@ _header_modules_feature = feature( name = FEATURE_NAMES.header_modules, - implies = ["use_header_modules", "header_module_compile"], + implies = ["header_module_compile"], + requires = [feature_set(features = ["use_header_modules"])], ) _header_module_compile_feature = feature( @@ -216,6 +217,7 @@ _use_header_modules_feature = feature( name = FEATURE_NAMES.use_header_modules, + enabled = True, flag_sets = [ flag_set( actions = [ @@ -1798,6 +1800,7 @@ FEATURE_NAMES.compiler_param_file: _compiler_param_file_feature, FEATURE_NAMES.gcc_quoting_for_param_files: _gcc_quoting_for_param_files_feature, FEATURE_NAMES.module_maps: _module_maps_feature, + FEATURE_NAMES.use_header_modules: _use_header_modules_feature, FEATURE_NAMES.static_link_cpp_runtimes: _static_link_cpp_runtimes_feature, FEATURE_NAMES.simple_compile_feature: _simple_compile_feature, FEATURE_NAMES.simple_link_feature: _simple_link_feature,