@@ -48,6 +48,16 @@ exports_files(
48
48
visibility = ["//:__subpackages__" ],
49
49
)
50
50
51
+ bool_flag (
52
+ name = "small_client" ,
53
+ build_setting_default = False ,
54
+ )
55
+
56
+ config_setting (
57
+ name = "small_client_flag" ,
58
+ flag_values = {":small_client" : "true" },
59
+ )
60
+
51
61
config_setting (
52
62
name = "grpc_no_ares" ,
53
63
values = {"define" : "grpc_no_ares=true" },
@@ -122,53 +132,52 @@ config_setting(
122
132
values = {"define" : "use_systemd=true" },
123
133
)
124
134
135
+ config_setting (
136
+ name = "fuchsia" ,
137
+ constraint_values = ["@platforms//os:fuchsia" ],
138
+ )
139
+
140
+ # Automatically disable certain deps for space-constrained clients where
141
+ # optional features may not be needed and binary size is more important.
142
+ # This includes mobile clients, and builds which request it explicitly.
125
143
selects .config_setting_group (
126
- name = "grpc_no_xds " ,
144
+ name = "grpc_small_clients " ,
127
145
match_any = [
128
- ":grpc_no_xds_define" ,
129
- # In addition to disabling XDS support when --define=grpc_no_xds=true is
130
- # specified, we also disable it on mobile platforms where it is not
131
- # likely to be needed and where reducing the binary size is more
132
- # important.
146
+ ":small_client_flag" , # --//:small_client
133
147
":android" ,
134
148
":ios" ,
135
149
],
136
150
)
137
151
152
+ selects .config_setting_group (
153
+ name = "grpc_no_xds" ,
154
+ match_any = [
155
+ ":grpc_no_xds_define" , # --define=grpc_no_xds=true
156
+ ":grpc_small_clients" ,
157
+ ],
158
+ )
159
+
138
160
selects .config_setting_group (
139
161
name = "grpc_no_ztrace" ,
140
162
match_any = [
141
- ":grpc_no_ztrace_define" ,
142
- # In addition to disabling ztrace support when --define=grpc_no_ztrace=true is
143
- # specified, we also disable it on mobile platforms where it is not
144
- # likely to be needed and where reducing the binary size is more
145
- # important.
146
- ":android" ,
147
- ":ios" ,
163
+ ":grpc_no_ztrace_define" , # --define=grpc_no_ztrace=true
164
+ ":grpc_small_clients" ,
148
165
],
149
166
)
150
167
151
168
selects .config_setting_group (
152
169
name = "grpc_no_rls" ,
153
170
match_any = [
154
- ":grpc_no_rls_flag" ,
155
- # Disable RLS support on mobile platforms where it is not likely to be
156
- # needed and where reducing the binary size is more important.
157
- ":android" ,
158
- ":ios" ,
171
+ ":grpc_no_rls_flag" , # --//:disable_grpc_rls
172
+ ":grpc_small_clients" ,
159
173
],
160
174
)
161
175
162
176
selects .config_setting_group (
163
177
name = "grpc_experiments_are_final" ,
164
178
match_any = [
165
- ":grpc_experiments_are_final_define" ,
166
- # In addition to disabling experiments when
167
- # --define=grpc_experiments_are_final=true is specified, we also disable
168
- # them on mobile platforms where runtime configuration of experiments is unlikely to be needed and where
169
- # reducing the binary size is more important.
170
- ":android" ,
171
- ":ios" ,
179
+ ":grpc_experiments_are_final_define" , # --define=grpc_experiments_are_final=true
180
+ ":grpc_small_clients" ,
172
181
],
173
182
)
174
183
0 commit comments