Skip to content

Commit ff06b70

Browse files
AustinSchuhcopybara-github
authored andcommitted
Add fastbuild_compile_flags to unix_cc_toolchain_config
Copybara Import from #301 BEGIN_PUBLIC Add fastbuild_compile_flags to unix_cc_toolchain_config (#301) We already have dbg_compile_flags and opt_compile_flags. This add symetry to enable pulling fastbuild flags out of .bazelrc files and into the toolchain. Closes #301 END_PUBLIC COPYBARA_INTEGRATE_REVIEW=#301 from AustinSchuh:fastbuild_flags 4e06396 PiperOrigin-RevId: 782686208 Change-Id: I02c8f569903ca938926485cd19bab75cc9414467
1 parent 4d4fc07 commit ff06b70

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cc/private/toolchain/unix_cc_toolchain_config.bzl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,15 @@ def _impl(ctx):
389389
),
390390
] if ctx.attr.compile_flags else []),
391391
),
392+
flag_set(
393+
actions = all_compile_actions,
394+
flag_groups = ([
395+
flag_group(
396+
flags = ctx.attr.fastbuild_compile_flags,
397+
),
398+
] if ctx.attr.fastbuild_compile_flags else []),
399+
with_features = [with_feature_set(features = ["fastbuild"])],
400+
),
392401
flag_set(
393402
actions = all_compile_actions,
394403
flag_groups = ([
@@ -1947,6 +1956,7 @@ cc_toolchain_config = rule(
19471956
"cxx_flags": attr.string_list(),
19481957
"dbg_compile_flags": attr.string_list(),
19491958
"extra_flags_per_feature": attr.string_list_dict(),
1959+
"fastbuild_compile_flags": attr.string_list(),
19501960
"host_system_name": attr.string(mandatory = True),
19511961
"link_flags": attr.string_list(),
19521962
"link_libs": attr.string_list(),

0 commit comments

Comments
 (0)