File tree 3 files changed +7
-43
lines changed
3 files changed +7
-43
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,6 @@ build --noenable_bzlmod
45
45
# feature flags
46
46
#
47
47
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 14
14
#
15
15
# SPDX-License-Identifier: Apache-2.0
16
16
17
- load ("@bazel_skylib//rules:common_settings.bzl" , "string_flag " )
17
+ load ("@bazel_skylib//rules:common_settings.bzl" , "bool_flag " )
18
18
load ("@buildifier_prebuilt//:rules.bzl" , "buildifier" )
19
19
20
20
exports_files (["LICENSE" ])
21
21
22
22
exports_files (["VERSION" ])
23
23
24
- # values: auto, on, off
25
- string_flag (
24
+ bool_flag (
26
25
name = "feature_acl" ,
27
- build_setting_default = "auto" ,
26
+ build_setting_default = False ,
28
27
visibility = ["//visibility:public" ],
29
28
)
30
29
Original file line number Diff line number Diff line change 14
14
#
15
15
# SPDX-License-Identifier: Apache-2.0
16
16
17
- load ("@bazel_skylib//lib:selects.bzl" , "selects" )
18
17
load ("@rules_cc//cc:defs.bzl" , "cc_library" )
19
18
load ("//bazel:configure_file.bzl" , "configure_file" )
20
19
load ("//bazel:configure_version.bzl" , "configure_version" )
@@ -67,42 +66,8 @@ configure_version(
67
66
)
68
67
69
68
config_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 (
100
69
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" },
106
71
)
107
72
108
73
configure_file (
You can’t perform that action at this time.
0 commit comments