Skip to content

Commit

Permalink
chore: explicitly use cfg_aliases 0.2.1
Browse files Browse the repository at this point in the history
This correctly handles recent nightly lint that requires to explicitly
define the CFG guards.
  • Loading branch information
kchibisov committed Jun 10, 2024
1 parent 1afec3c commit 3206d10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 3 additions & 15 deletions build.rs
Original file line number Diff line number Diff line change
@@ -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" },
Expand All @@ -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)");
}

0 comments on commit 3206d10

Please sign in to comment.