Skip to content

Commit e0807f4

Browse files
committed
Fix --cxxopt not overriding features
1 parent 5f17fa1 commit e0807f4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

bazel/toolchain.bzl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@ def portable_cc_toolchain(
5454
name + "_target_args",
5555
Label("//detail/args:default"),
5656
] + args,
57-
enabled_features = [
58-
"@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features",
59-
] + select({
57+
enabled_features = select({
6058
Label("//detail/compilation_mode:fastbuild"): fastbuild_features,
6159
Label("//detail/compilation_mode:dbg"): dbg_features,
6260
Label("//detail/compilation_mode:opt"): opt_features,
63-
}) + enabled_features,
61+
}) + enabled_features + [
62+
# last, to allow overriding other features with --cxxopt etc (rules_cc#446)
63+
"@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features",
64+
],
6465
known_features = [
6566
"@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features",
6667
] + [Label(f) for f in FEATURES.keys()] + known_features,

0 commit comments

Comments
 (0)