mirror of
https://gitee.com/openharmony/third_party_rust_link-cplusplus
synced 2024-11-27 01:20:52 +00:00
Rename Cargo features to libstdc++ and libc++
This commit is contained in:
parent
58f4f40f93
commit
37fb86a4aa
@ -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"]
|
||||
|
@ -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
|
||||
|
4
build.rs
4
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 {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user