From c56ccf6a9fdd930da0b3c165546ecab582a161d8 Mon Sep 17 00:00:00 2001 From: Tim Neumann Date: Wed, 3 Jun 2015 15:21:16 +0200 Subject: [PATCH] simplify cpp stdlib handling, don't use -stdlib= --- src/lib.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7b3e7bb..04c5f75 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -162,19 +162,16 @@ impl Config { self } - /// Set the standard library to use when compiling with C++ support. + /// Set the standard library to link against when compiling with C++ + /// support. /// /// The default value of this property depends on the current target: On /// OS X `Some("c++")` is used and for other supported targets /// `Some("stdc++")` is used. /// - /// The choosen library is specified when compiling using the `-stdlib` flag - /// and Cargo is instructed to link to the given library. - /// /// A value of `None` indicates that no special actions regarding the C++ - /// standard library should be take. This means that neither are linking - /// instructions provided to Cargo nor is the compiler told to use a - /// specific standard library. + /// standard library should be take. This means that you have to link + /// against the correct standard library yourself if required. /// /// The given library name must not contain the `lib` prefix. pub fn cpp_stdlib(&mut self, cpp_stdlib: Option<&str>) -> &mut Config { @@ -294,12 +291,6 @@ impl Config { } } - if self.cpp { - if let Some(ref stdlib) = self.cpp_stdlib { - cmd.arg(&format!("-stdlib=lib{}", stdlib)); - } - } - for directory in self.include_directories.iter() { cmd.arg(if target.contains("msvc") {"/I"} else {"-I"}); cmd.arg(directory);