Skip to content

Rename Cargo features to libstdc++ and libc++ #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down