Skip to content

Commit 3dfa37f

Browse files
committed
Replace lingering references to cpu with platform equivalents.
PiperOrigin-RevId: 872611174
1 parent ab9faa3 commit 3dfa37f

File tree

1 file changed

+2
-42
lines changed

1 file changed

+2
-42
lines changed

build_defs/BUILD.bazel

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,6 @@ config_setting(
9797
},
9898
)
9999

100-
config_setting(
101-
name = "aarch64",
102-
values = {"cpu": "linux-aarch_64"},
103-
)
104-
105-
config_setting(
106-
name = "x86_64",
107-
values = {"cpu": "linux-x86_64"},
108-
)
109-
110100
# Android NDK builds can specify different crosstool_top flags to choose which
111101
# STL they use for C++. We need these multiple variants to catch all of those
112102
# versions of crosstool_top and reliably detect Android.
@@ -158,43 +148,13 @@ config_setting(
158148
)
159149

160150
config_setting(
161-
name = "config_win32",
162-
values = {
163-
"cpu": "win32",
164-
},
165-
)
166-
167-
config_setting(
168-
name = "config_win64",
169-
values = {
170-
"cpu": "win64",
171-
},
172-
)
173-
174-
selects.config_setting_group(
175151
name = "config_win",
176-
match_any = [
177-
":config_win32",
178-
":config_win64",
179-
],
152+
constraint_values = ["@platforms//os:windows"],
180153
)
181154

182155
config_setting(
183-
name = "config_osx_aarch64",
184-
values = {"cpu": "osx-aarch_64"},
185-
)
186-
187-
config_setting(
188-
name = "config_osx_x86_64",
189-
values = {"cpu": "osx-x86_64"},
190-
)
191-
192-
selects.config_setting_group(
193156
name = "config_osx",
194-
match_any = [
195-
":config_osx_aarch64",
196-
":config_osx_x86_64",
197-
],
157+
constraint_values = ["@platforms//os:osx"],
198158
)
199159

200160
# Internal testing:

0 commit comments

Comments
 (0)