Add check for rust version

This commit is contained in:
Charles-Xavier Roy
2023-02-17 16:25:16 -05:00
parent bd4a0981ba
commit f7636428ed
4 changed files with 18 additions and 9 deletions
+5
View File
@@ -114,6 +114,11 @@ fn main() {
println!("cargo:rustc-cfg=no_std_atomic");
}
}
// Support for core::ffi::CStr and alloc::ffi::CString stabilized in Rust 1.64.
if minor < 64 {
println!("cargo:rustc-cfg=no_core_cstr");
}
}
fn rustc_minor_version() -> Option<u32> {