File tree Expand file tree Collapse file tree 3 files changed +7
-43
lines changed Expand file tree Collapse file tree 3 files changed +7
-43
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,6 @@ build --noenable_bzlmod
4545# feature flags
4646#
4747
48- # value [auto, on, off]
49- # 'auto' is platform dependent ('on' on Linux and QNX, 'off' on other OS) and the default value if the flag is not set
50- # build --//:feature_acl=off
48+ # value [True, False]. Default: False.
49+ # Here we turn on the setting for Linux in this repo. Downstream consumers are unaffected.
50+ build:linux --//:feature_acl=True
Original file line number Diff line number Diff line change 1414#
1515# SPDX-License-Identifier: Apache-2.0
1616
17- load ("@bazel_skylib//rules:common_settings.bzl" , "string_flag " )
17+ load ("@bazel_skylib//rules:common_settings.bzl" , "bool_flag " )
1818load ("@buildifier_prebuilt//:rules.bzl" , "buildifier" )
1919
2020exports_files (["LICENSE" ])
2121
2222exports_files (["VERSION" ])
2323
24- # values: auto, on, off
25- string_flag (
24+ bool_flag (
2625 name = "feature_acl" ,
27- build_setting_default = "auto" ,
26+ build_setting_default = False ,
2827 visibility = ["//visibility:public" ],
2928)
3029
Original file line number Diff line number Diff line change 1414#
1515# SPDX-License-Identifier: Apache-2.0
1616
17- load ("@bazel_skylib//lib:selects.bzl" , "selects" )
1817load ("@rules_cc//cc:defs.bzl" , "cc_library" )
1918load ("//bazel:configure_file.bzl" , "configure_file" )
2019load ("//bazel:configure_version.bzl" , "configure_version" )
@@ -67,42 +66,8 @@ configure_version(
6766)
6867
6968config_setting (
70- name = "acl_auto" ,
71- flag_values = {
72- "//:feature_acl" : "auto" ,
73- },
74- )
75-
76- config_setting (
77- name = "acl_enabled" ,
78- flag_values = {
79- "//:feature_acl" : "on" ,
80- },
81- )
82-
83- selects .config_setting_group (
84- name = "acl_linux_enabled" ,
85- match_all = [
86- ":linux" ,
87- ":acl_auto" ,
88- ],
89- )
90-
91- selects .config_setting_group (
92- name = "acl_qnx_enabled" ,
93- match_all = [
94- ":qnx" ,
95- ":acl_auto" ,
96- ],
97- )
98-
99- selects .config_setting_group (
10069 name = "cfg_feature_acl" ,
101- match_any = [
102- ":acl_enabled" ,
103- ":acl_linux_enabled" ,
104- ":acl_qnx_enabled" ,
105- ],
70+ flag_values = {"//:feature_acl" : "True" },
10671)
10772
10873configure_file (
You can’t perform that action at this time.
0 commit comments