commit | b417ce3fda0f36f8d97bf9fb5b8f24e30ccaa81b | [log] [tgz] |
---|---|---|
author | David Tolnay <dtolnay@gmail.com> | Fri Jan 24 23:18:31 2020 |
committer | David Tolnay <dtolnay@gmail.com> | Fri Jan 24 23:19:07 2020 |
tree | a46cce4198f67153eacd648577a763a2ced3f260 | |
parent | f3b53709b1520e6658468054d8e680e27775512e [diff] |
Drop to 2015 edition This crate doesn't contain any code, might as well support any compiler.
-lstdc++
or -lc++
This crate exists for the purpose of passing -lstdc++
or -lc++
to the linker, while making it possible for an application to make that choice on behalf of its library dependencies.
Without this crate, a library would need to:
neither of which are good experiences.
An application or library that is fine with either of libstdc++ or libc++ being linked, whichever is the platform's default, should use:
[dependencies] link-cplusplus = "0.0"
An application that wants a particular one or the other linked should use:
[dependencies] link-cplusplus = { version = "0.0", features = ["libstdcxx"] } # or link-cplusplus = { version = "0.0", features = ["libcxx"] }
An application that wants to handle its own more complicated logic for link flags from its build script can make this crate do nothing by using:
[dependencies] link-cplusplus = { version = "0.0", features = ["nothing"] }