Skip to content

Commit

Permalink
cfg-checking ceremony
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed May 13, 2024
1 parent a33f561 commit 7979065
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,32 @@ fn main() {
if let Ok(version) = env::var("DEP_CARES_VERSION_NUMBER") {
let version = u64::from_str_radix(&version, 16).unwrap();

println!("cargo::rustc-check-cfg=cfg(cares1_15)");
if version >= 0x1_0f_00 {
println!("cargo:rustc-cfg=cares1_15");
}

println!("cargo::rustc-check-cfg=cfg(cares1_17)");
if version >= 0x1_11_00 {
println!("cargo:rustc-cfg=cares1_17");
}

println!("cargo::rustc-check-cfg=cfg(cares1_19)");
if version >= 0x1_13_00 {
println!("cargo:rustc-cfg=cares1_19");
}

println!("cargo::rustc-check-cfg=cfg(cares1_20)");
if version >= 0x1_14_00 {
println!("cargo:rustc-cfg=cares1_20");
}

println!("cargo::rustc-check-cfg=cfg(cares1_22)");
if version >= 0x1_16_00 {
println!("cargo:rustc-cfg=cares1_22");
}

println!("cargo::rustc-check-cfg=cfg(cares1_23)");
if version >= 0x1_17_00 {
println!("cargo:rustc-cfg=cares1_23");
}
Expand Down

0 comments on commit 7979065

Please sign in to comment.