Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu committed Jun 23, 2024
1 parent fe98c2c commit 40397fd
Showing 1 changed file with 24 additions and 25 deletions.
49 changes: 24 additions & 25 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -965,31 +965,22 @@ impl Build {
self
}

/// Force the C++ compiler to use the specified standard library.
///
/// Setting this option will automatically set `cpp_link_stdlib` to the same
/// value.
///
/// The default value of this option is always `None`.
///
/// This option has no effect when compiling for a Visual Studio based
/// target.
/// Set the standard library to link against when compiling with C++
/// support.
///
/// This option sets the `-stdlib` flag, which is only supported by some
/// compilers (clang, icc) but not by others (gcc). The library will not
/// detect which compiler is used, as such it is the responsibility of the
/// caller to ensure that this option is only used in conjunction with a
/// compiler which supports the `-stdlib` flag.
/// If the `CXXSTDLIB` environment variable is set, its value will
/// override the default value, but not the value explicitly set by calling
/// this function.
///
/// A value of `None` indicates that no specific C++ standard library should
/// be used, otherwise `-stdlib` is added to the compile invocation.
/// A value of `None` indicates that no automatic linking should happen,
/// otherwise cargo will link against the specified library.
///
/// The given library name must not contain the `lib` prefix.
///
/// Common values:
/// - `stdc++` for GNU
/// - `c++` for Clang
///
/// - `c++_shared` or `c++_static` for Android
///
/// # Example
///
Expand All @@ -1008,22 +999,30 @@ impl Build {
self
}

/// Set the standard library to link against when compiling with C++
/// support.
/// Force the C++ compiler to use the specified standard library.
///
/// If the `CXXSTDLIB` environment variable is set, its value will
/// override the default value, but not the value explicitly set by calling
/// this function.
/// Setting this option will automatically set `cpp_link_stdlib` to the same
/// value.
///
/// A value of `None` indicates that no automatic linking should happen,
/// otherwise cargo will link against the specified library.
/// The default value of this option is always `None`.
///
/// This option has no effect when compiling for a Visual Studio based
/// target.
///
/// This option sets the `-stdlib` flag, which is only supported by some
/// compilers (clang, icc) but not by others (gcc). The library will not
/// detect which compiler is used, as such it is the responsibility of the
/// caller to ensure that this option is only used in conjunction with a
/// compiler which supports the `-stdlib` flag.
///
/// A value of `None` indicates that no specific C++ standard library should
/// be used, otherwise `-stdlib` is added to the compile invocation.
///
/// The given library name must not contain the `lib` prefix.
///
/// Common values:
/// - `stdc++` for GNU
/// - `c++` for Clang
/// - `c++_shared` or `c++_static` for Android
///
/// # Example
///
Expand Down

0 comments on commit 40397fd

Please sign in to comment.