Skip to content

Commit 277013b

Browse files
authored
Use cfg_aliases 0.2.1 (#2490)
With 0.2.1, there's no need to manually write rustc-check-cfg statements.
1 parent eb3209a commit 277013b

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ caps = "0.5.3"
8585
sysctl = "0.4"
8686

8787
[build-dependencies]
88-
cfg_aliases = "0.2"
88+
cfg_aliases = "0.2.1"
8989

9090
[[test]]
9191
name = "test"

build.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,7 @@ fn main() {
2727
solarish: { any(illumos, solaris) },
2828
}
2929

30-
// Below are Nix's custom cfg values that we need to let the compiler know
31-
println!("cargo:rustc-check-cfg=cfg(apple_targets)");
32-
println!("cargo:rustc-check-cfg=cfg(bsd)");
33-
println!("cargo:rustc-check-cfg=cfg(bsd_without_apple)");
34-
println!("cargo:rustc-check-cfg=cfg(linux_android)");
35-
println!("cargo:rustc-check-cfg=cfg(freebsdlike)");
36-
println!("cargo:rustc-check-cfg=cfg(netbsdlike)");
37-
println!("cargo:rustc-check-cfg=cfg(solarish)");
30+
// Below are custom cfg values set during some CI steps.
3831
println!("cargo:rustc-check-cfg=cfg(fbsd14)");
3932
println!("cargo:rustc-check-cfg=cfg(qemu)");
4033
}

0 commit comments

Comments
 (0)