chore: explicitly use cfg_aliases 0.2.1

This correctly handles recent nightly lint that requires to explicitly
define the CFG guards.
This commit is contained in:
Kirill Chibisov
2024-05-22 15:51:29 +04:00
parent 1afec3ca0d
commit 3206d105fe
2 changed files with 4 additions and 16 deletions

View File

@@ -71,7 +71,7 @@ rwh_05 = ["dep:rwh_05", "ndk/rwh_05"]
rwh_06 = ["dep:rwh_06", "ndk/rwh_06"]
[build-dependencies]
cfg_aliases = "0.2.0"
cfg_aliases = "0.2.1"
[dependencies]
bitflags = "2"

View File

@@ -1,10 +1,10 @@
use cfg_aliases::cfg_aliases;
fn main() {
// The script doesn't depend on our code
// The script doesn't depend on our code.
println!("cargo:rerun-if-changed=build.rs");
// Setup cfg aliases
// Setup cfg aliases.
cfg_aliases! {
// Systems.
android_platform: { target_os = "android" },
@@ -22,18 +22,6 @@ fn main() {
orbital_platform: { redox },
}
println!("cargo:rustc-check-cfg=cfg(android_platform)");
println!("cargo:rustc-check-cfg=cfg(web_platform)");
println!("cargo:rustc-check-cfg=cfg(macos_platform)");
println!("cargo:rustc-check-cfg=cfg(ios_platform)");
println!("cargo:rustc-check-cfg=cfg(windows_platform)");
println!("cargo:rustc-check-cfg=cfg(apple)");
println!("cargo:rustc-check-cfg=cfg(free_unix)");
println!("cargo:rustc-check-cfg=cfg(redox)");
println!("cargo:rustc-check-cfg=cfg(x11_platform)");
println!("cargo:rustc-check-cfg=cfg(wayland_platform)");
println!("cargo:rustc-check-cfg=cfg(orbital_platform)");
// Winit defined cfgs.
println!("cargo:rustc-check-cfg=cfg(unreleased_changelogs)");
}