Skip to content

Commit 2db18d2

Browse files
authored
Merge pull request #600 from SallySoul/change-getcpplib-doc
2 parents 20de748 + a6db059 commit 2db18d2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,12 @@ impl Build {
633633
///
634634
/// The other `cpp_*` options will only become active if this is set to
635635
/// `true`.
636+
///
637+
/// The name of the C++ standard library to link is decided by:
638+
/// 1. If [cpp_link_stdlib](Build::cpp_link_stdlib) is set, use its value.
639+
/// 2. Else if the `CXXSTDLIB` environment variable is set, use its value.
640+
/// 3. Else the default is `libc++` for OS X and BSDs, `libc++_shared` for Android,
641+
/// `None` for MSVC and `libstdc++` for anything else.
636642
pub fn cpp(&mut self, cpp: bool) -> &mut Build {
637643
self.cpp = cpp;
638644
self
@@ -741,8 +747,6 @@ impl Build {
741747
/// Set the standard library to link against when compiling with C++
742748
/// support.
743749
///
744-
/// See [`get_cpp_link_stdlib`](cc::Build::get_cpp_link_stdlib) documentation
745-
/// for the default value.
746750
/// If the `CXXSTDLIB` environment variable is set, its value will
747751
/// override the default value, but not the value explicitly set by calling
748752
/// this function.

0 commit comments

Comments
 (0)