Skip to content

Commit 02cae20

Browse files
authored
Merge pull request #4 from dtolnay/plusplus
Rename Cargo features to libstdc++ and libc++
2 parents 58f4f40 + 37fb86a commit 02cae20

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

Cargo.toml

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ cc = "1.0"
1414

1515
[features]
1616
default = [] # automatic
17-
libstdcxx = [] # force libstdc++
18-
libcxx = [] # force libc++
17+
"libstdc++" = [] # force libstdc++
18+
"libc++" = [] # force libc++
1919
nothing = [] # link nothing, determined somewhere else
2020

21+
# deprecated aliases
22+
libstdcxx = ["libstdc++"]
23+
libcxx = ["libc++"]
24+
2125
[package.metadata.docs.rs]
2226
targets = ["x86_64-unknown-linux-gnu"]

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ An application that wants a particular one or the other linked should use:
3535

3636
```toml
3737
[dependencies]
38-
link-cplusplus = { version = "1.0", features = ["libstdcxx"] }
38+
link-cplusplus = { version = "1.0", features = ["libstdc++"] }
3939

4040
# or
4141

42-
link-cplusplus = { version = "1.0", features = ["libcxx"] }
42+
link-cplusplus = { version = "1.0", features = ["libc++"] }
4343
```
4444

4545
An application that wants to handle its own more complicated logic for link

build.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use std::fs;
33
use std::path::PathBuf;
44

55
fn main() {
6-
let libstdcxx = cfg!(feature = "libstdcxx");
7-
let libcxx = cfg!(feature = "libcxx");
6+
let libstdcxx = cfg!(feature = "libstdc++");
7+
let libcxx = cfg!(feature = "libc++");
88
let nothing = cfg!(feature = "nothing");
99

1010
if nothing {

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
//!
3838
//! ```toml
3939
//! [dependencies]
40-
//! link-cplusplus = { version = "1.0", features = ["libstdcxx"] }
40+
//! link-cplusplus = { version = "1.0", features = ["libstdc++"] }
4141
//!
4242
//! # or
4343
//!
44-
//! link-cplusplus = { version = "1.0", features = ["libcxx"] }
44+
//! link-cplusplus = { version = "1.0", features = ["libc++"] }
4545
//! ```
4646
//!
4747
//! An application that wants to handle its own more complicated logic for link

0 commit comments

Comments
 (0)