summaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorgnzlbg <gonzalobg88@gmail.com>2019-05-24 13:22:03 +0200
committergnzlbg <gonzalobg88@gmail.com>2019-05-24 13:22:03 +0200
commit4ac26afa83e83bd1da49b637af814f56515c8184 (patch)
treef3e37560af00ed0a1bb328ba94d48060d8378897 /build.rs
parentf775bea997307fe701e05952c1c97877b40c9f9f (diff)
downloadrust-libc-4ac26afa83e83bd1da49b637af814f56515c8184.tar.gz
Deprecate `use_std` cargo feature: use `std` instead .
Related to #657 .
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/build.rs b/build.rs
index 9b13376779..be96e83b68 100644
--- a/build.rs
+++ b/build.rs
@@ -9,6 +9,13 @@ fn main() {
std::env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok();
let align_cargo_feature = std::env::var("CARGO_FEATURE_ALIGN").is_ok();
+ if std::env::var("CARGO_FEATURE_USE_STD").is_ok() {
+ println!(
+ "cargo:warning=\"libc's use_std cargo feature is deprecated since libc 0.2.55; \
+ please consider using the `std` cargo feature instead\""
+ );
+ }
+
// Rust >= 1.15 supports private module use:
if rustc_minor_ver >= 15 || rustc_dep_of_std {
println!("cargo:rustc-cfg=libc_priv_mod_use");