xref: /aosp_15_r20/external/bazelbuild-platforms/os/BUILD (revision ef3a692c0746f7dadd4fb3b5728d17696f151f9c)
1# Standard constraint_setting and constraint_values to be used in platforms.
2licenses(["notice"])
3
4package(
5    default_visibility = ["//visibility:public"],
6)
7
8filegroup(
9    name = "srcs",
10    srcs = glob(["**"]),
11)
12
13# To add a new constraint_value see https://github.com/bazelbuild/platforms.
14constraint_setting(name = "os")
15
16constraint_value(
17    name = "freebsd",
18    constraint_setting = ":os",
19)
20
21constraint_value(
22    name = "netbsd",
23    constraint_setting = ":os",
24)
25
26constraint_value(
27    name = "openbsd",
28    constraint_setting = ":os",
29)
30
31constraint_value(
32    name = "haiku",
33    constraint_setting = ":os",
34)
35
36constraint_value(
37    name = "android",
38    constraint_setting = ":os",
39)
40
41constraint_value(
42    name = "linux",
43    constraint_setting = ":os",
44)
45
46constraint_value(
47    name = "windows",
48    constraint_setting = ":os",
49)
50
51# For the VXworks OS, usefull for embedded systems
52constraint_value(
53    name = "vxworks",
54    constraint_setting = ":os",
55)
56
57# For platforms with no OS, like microcontrollers.
58constraint_value(
59    name = "none",
60    constraint_setting = ":os",
61)
62
63### Apple OS Values
64
65constraint_value(
66    name = "ios",
67    constraint_setting = ":os",
68)
69
70# TODO(b/138656886): Rename this to macos instead of osx.
71constraint_value(
72    name = "osx",
73    constraint_setting = ":os",
74)
75
76alias(
77    name = "macos",
78    actual = ":osx",
79)
80
81constraint_value(
82    name = "tvos",
83    constraint_setting = ":os",
84)
85
86constraint_value(
87    name = "watchos",
88    constraint_setting = ":os",
89)
90
91constraint_value(
92    name = "visionos",
93    constraint_setting = ":os",
94)
95
96constraint_value(
97    name = "qnx",
98    constraint_setting = ":os",
99)
100
101# NixOS uses the Linux kernel, but is not ABI-compatible with any
102# other Linux distribution. This is because the dynamic linker is in
103# a non-standard (and undefined) location on the filesystem.
104constraint_value(
105    name = "nixos",
106    constraint_setting = ":os",
107)
108
109constraint_value(
110    name = "emscripten",
111    constraint_setting = ":os",
112)
113
114# WASI (WebAssembly System Interface)
115# https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-overview.md
116constraint_value(
117    name = "wasi",
118    constraint_setting = ":os",
119)
120
121constraint_value(
122    name = "fuchsia",
123    constraint_setting = ":os",
124)
125
126constraint_value(
127    name = "chromiumos",
128    constraint_setting = ":os",
129)
130