1# Each platform creates a constraint @<platform>//:platform_constraint that
2# is listed in its constraint_values; rule that want to select a specific
3# platform to run on can put @<platform>//:platform_constraing into their
4# exec_compatible_with attribute.
5# Toolchains can similarly be marked with target_compatible_with or
6# exec_compatible_with to bind them to this platform.
7constraint_setting(
8    name = "platform_setting"
9)
10
11constraint_value(
12    name = "platform_constraint",
13    constraint_setting = ":platform_setting",
14    visibility = ["//visibility:public"],
15)
16
17platform(
18    name = "platform",
19    visibility = ["//visibility:public"],
20    constraint_values = [
21        "@bazel_tools//platforms:%{cpu}",
22        "@bazel_tools//platforms:%{platform}",
23        ":platform_constraint",
24    ],
25    exec_properties = %{exec_properties},
26)
27