summaryrefslogtreecommitdiffstats
path: root/third_party/rust/nix/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/nix/build.rs')
-rw-r--r--third_party/rust/nix/build.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/third_party/rust/nix/build.rs b/third_party/rust/nix/build.rs
new file mode 100644
index 0000000000..4535af1f04
--- /dev/null
+++ b/third_party/rust/nix/build.rs
@@ -0,0 +1,25 @@
+use cfg_aliases::cfg_aliases;
+
+fn main() {
+ cfg_aliases! {
+ android: { target_os = "android" },
+ dragonfly: { target_os = "dragonfly" },
+ ios: { target_os = "ios" },
+ freebsd: { target_os = "freebsd" },
+ illumos: { target_os = "illumos" },
+ linux: { target_os = "linux" },
+ macos: { target_os = "macos" },
+ netbsd: { target_os = "netbsd" },
+ openbsd: { target_os = "openbsd" },
+ solaris: { target_os = "solaris" },
+ watchos: { target_os = "watchos" },
+ tvos: { target_os = "tvos" },
+
+ apple_targets: { any(ios, macos, watchos, tvos) },
+ bsd: { any(freebsd, dragonfly, netbsd, openbsd, apple_targets) },
+ linux_android: { any(android, linux) },
+ freebsdlike: { any(dragonfly, freebsd) },
+ netbsdlike: { any(netbsd, openbsd) },
+ solarish: { any(illumos, solaris) },
+ }
+}