@@ -53,14 +53,22 @@ cc_args(
5353
5454cc_feature_constraint (
5555 name = "not_gnu11" ,
56- none_of = ["//features/native/markers:gnu11" ],
56+ none_of = [
57+ "//features/native/markers:gnu11" ,
58+ "//features/native/markers:c99" ,
59+ ],
5760)
5861
5962cc_feature_constraint (
6063 name = "is_gnu11" ,
6164 all_of = ["//features/native/markers:gnu11" ],
6265)
6366
67+ cc_feature_constraint (
68+ name = "is_c99" ,
69+ all_of = ["//features/native/markers:c99" ],
70+ )
71+
6472cc_args (
6573 name = "c_std_c11_args" ,
6674 actions = ["@rules_cc//cc/toolchains/actions:c_compile_actions" ],
@@ -75,6 +83,13 @@ cc_args(
7583 requires_any_of = [":is_gnu11" ],
7684)
7785
86+ cc_args (
87+ name = "c_std_c99_args" ,
88+ actions = ["@rules_cc//cc/toolchains/actions:c_compile_actions" ],
89+ args = ["-std=c99" ],
90+ requires_any_of = [":is_c99" ],
91+ )
92+
7893cc_args (
7994 name = "default_cxx_compile_flags_args" ,
8095 actions = ["@rules_cc//cc/toolchains/actions:cpp_compile_actions" ],
@@ -152,6 +167,7 @@ cc_feature(
152167 ":target_cpu_flags_args" ,
153168 ":c_std_c11_args" ,
154169 ":c_std_gnu11_args" ,
170+ ":c_std_c99_args" ,
155171 ":default_cxx_compile_flags_args" ,
156172 ":dbg_compile_flags_args" ,
157173 ":opt_compile_flags_args" ,
0 commit comments