From 37fb86a4aab598a77fd3e81fb2afb2de0eed3927 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 25 Sep 2020 17:39:51 -0400 Subject: [PATCH] Rename Cargo features to libstdc++ and libc++ --- Cargo.toml | 8 ++++++-- README.md | 4 ++-- build.rs | 4 ++-- src/lib.rs | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 08e2fc1..72bd63f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,9 +14,13 @@ cc = "1.0" [features] default = [] # automatic -libstdcxx = [] # force libstdc++ -libcxx = [] # force libc++ +"libstdc++" = [] # force libstdc++ +"libc++" = [] # force libc++ nothing = [] # link nothing, determined somewhere else +# deprecated aliases +libstdcxx = ["libstdc++"] +libcxx = ["libc++"] + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/README.md b/README.md index b6046a2..6ad4221 100644 --- a/README.md +++ b/README.md @@ -35,11 +35,11 @@ An application that wants a particular one or the other linked should use: ```toml [dependencies] -link-cplusplus = { version = "1.0", features = ["libstdcxx"] } +link-cplusplus = { version = "1.0", features = ["libstdc++"] } # or -link-cplusplus = { version = "1.0", features = ["libcxx"] } +link-cplusplus = { version = "1.0", features = ["libc++"] } ``` An application that wants to handle its own more complicated logic for link diff --git a/build.rs b/build.rs index 6ff5a56..b95f796 100644 --- a/build.rs +++ b/build.rs @@ -3,8 +3,8 @@ use std::fs; use std::path::PathBuf; fn main() { - let libstdcxx = cfg!(feature = "libstdcxx"); - let libcxx = cfg!(feature = "libcxx"); + let libstdcxx = cfg!(feature = "libstdc++"); + let libcxx = cfg!(feature = "libc++"); let nothing = cfg!(feature = "nothing"); if nothing { diff --git a/src/lib.rs b/src/lib.rs index 2723e45..f2290be 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,11 +37,11 @@ //! //! ```toml //! [dependencies] -//! link-cplusplus = { version = "1.0", features = ["libstdcxx"] } +//! link-cplusplus = { version = "1.0", features = ["libstdc++"] } //! //! # or //! -//! link-cplusplus = { version = "1.0", features = ["libcxx"] } +//! link-cplusplus = { version = "1.0", features = ["libc++"] } //! ``` //! //! An application that wants to handle its own more complicated logic for link