diff --git a/cc/private/toolchain/windows_cc_toolchain_config.bzl b/cc/private/toolchain/windows_cc_toolchain_config.bzl index 5d0d40feb..d048b5d21 100644 --- a/cc/private/toolchain/windows_cc_toolchain_config.bzl +++ b/cc/private/toolchain/windows_cc_toolchain_config.bzl @@ -47,6 +47,11 @@ all_compile_actions = [ ACTION_NAMES.lto_backend, ] +all_c_compile_actions = [ + ACTION_NAMES.c_compile, + ACTION_NAMES.clif_match, +] + all_cpp_compile_actions = [ ACTION_NAMES.cpp_compile, ACTION_NAMES.linkstamp_compile, @@ -728,6 +733,17 @@ def _impl(ctx): ], ) + default_c_std_feature = feature( + name = "default_c_std", + enabled = True, + flag_sets = [ + flag_set( + actions = all_c_compile_actions, + flag_groups = [flag_group(flags = ["/std:c17"])], + ), + ], + ) + default_cpp_std_feature = feature( name = "default_cpp_std", enabled = True, @@ -1288,6 +1304,7 @@ def _impl(ctx): no_stripping_feature, targets_windows_feature, copy_dynamic_libraries_to_binary_feature, + default_c_std_feature, default_cpp_std_feature, default_compile_flags_feature, msvc_env_feature,