2019-06-06 09:18:26 +00:00
|
|
|
# Standard constraint_setting and constraint_values to be used in platforms.
|
|
|
|
licenses(["notice"])
|
|
|
|
|
|
|
|
package(
|
|
|
|
default_visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "srcs",
|
|
|
|
srcs = glob(["**"]),
|
|
|
|
)
|
|
|
|
|
2019-06-18 18:15:05 +00:00
|
|
|
# To add a new constraint_value see https://github.com/bazelbuild/platforms.
|
2019-06-18 18:35:25 +00:00
|
|
|
constraint_setting(name = "os")
|
2019-06-06 09:18:26 +00:00
|
|
|
|
|
|
|
constraint_value(
|
2019-08-05 16:40:46 +00:00
|
|
|
name = "freebsd",
|
2019-06-06 09:18:26 +00:00
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
|
|
|
|
2021-09-16 08:22:39 +00:00
|
|
|
constraint_value(
|
|
|
|
name = "netbsd",
|
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
|
|
|
|
2019-08-09 15:39:40 +00:00
|
|
|
constraint_value(
|
|
|
|
name = "openbsd",
|
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
|
|
|
|
2022-05-09 16:07:44 +00:00
|
|
|
constraint_value(
|
|
|
|
name = "haiku",
|
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
|
|
|
|
2019-06-06 09:18:26 +00:00
|
|
|
constraint_value(
|
2019-08-05 16:40:46 +00:00
|
|
|
name = "android",
|
2019-06-06 09:18:26 +00:00
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
|
|
|
|
|
|
|
constraint_value(
|
2019-08-05 16:40:46 +00:00
|
|
|
name = "linux",
|
2019-06-06 09:18:26 +00:00
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
|
|
|
|
|
|
|
constraint_value(
|
2019-08-05 16:40:46 +00:00
|
|
|
name = "windows",
|
2019-07-30 19:29:49 +00:00
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
|
|
|
|
2019-08-15 17:46:27 +00:00
|
|
|
# For platforms with no OS, like microcontrollers.
|
|
|
|
constraint_value(
|
|
|
|
name = "none",
|
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
|
|
|
|
2019-08-05 16:40:46 +00:00
|
|
|
### Apple OS Values
|
|
|
|
|
2019-07-30 19:29:49 +00:00
|
|
|
constraint_value(
|
2019-08-05 16:40:46 +00:00
|
|
|
name = "ios",
|
2019-07-30 19:29:49 +00:00
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
|
|
|
|
2019-08-05 16:40:46 +00:00
|
|
|
# TODO(b/138656886): Rename this to macos instead of osx.
|
2019-07-30 19:29:49 +00:00
|
|
|
constraint_value(
|
2019-08-05 16:40:46 +00:00
|
|
|
name = "osx",
|
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
|
|
|
|
2019-08-26 15:07:51 +00:00
|
|
|
alias(
|
|
|
|
name = "macos",
|
|
|
|
actual = ":osx",
|
|
|
|
)
|
|
|
|
|
2019-08-05 16:40:46 +00:00
|
|
|
constraint_value(
|
|
|
|
name = "tvos",
|
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
|
|
|
|
|
|
|
constraint_value(
|
|
|
|
name = "watchos",
|
2019-06-06 09:18:26 +00:00
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
2019-11-05 16:03:21 +00:00
|
|
|
|
|
|
|
constraint_value(
|
|
|
|
name = "qnx",
|
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
2019-12-30 16:53:47 +00:00
|
|
|
|
|
|
|
# NixOS uses the Linux kernel, but is not ABI-compatible with any
|
|
|
|
# other Linux distribution. This is because the dynamic linker is in
|
|
|
|
# a non-standard (and undefined) location on the filesystem.
|
|
|
|
constraint_value(
|
|
|
|
name = "nixos",
|
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
2020-11-05 05:24:03 +00:00
|
|
|
|
|
|
|
# WASI (WebAssembly System Interface)
|
|
|
|
# https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-overview.md
|
|
|
|
constraint_value(
|
|
|
|
name = "wasi",
|
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
2021-11-09 18:44:49 +00:00
|
|
|
|
|
|
|
constraint_value(
|
|
|
|
name = "fuchsia",
|
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|
2022-08-22 17:44:20 +00:00
|
|
|
|
|
|
|
constraint_value(
|
|
|
|
name = "chromiumos",
|
|
|
|
constraint_setting = ":os",
|
|
|
|
)
|