diff options
Diffstat (limited to 'rand/build.rs')
-rw-r--r-- | rand/build.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/rand/build.rs b/rand/build.rs new file mode 100644 index 0000000..e44b643 --- /dev/null +++ b/rand/build.rs @@ -0,0 +1,14 @@ +extern crate rustc_version; +use rustc_version::{version, Version}; + +fn main() { + if version().unwrap() >= Version::parse("1.25.0").unwrap() { + println!("cargo:rustc-cfg=rust_1_25"); + } + if version().unwrap() >= Version::parse("1.26.0").unwrap() { + println!("cargo:rustc-cfg=rust_1_26"); + } + if version().unwrap() >= Version::parse("1.27.0").unwrap() { + println!("cargo:rustc-cfg=rust_1_27"); + } +} |