Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 5 pull requests #40758

Merged
merged 15 commits into from
Mar 23, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
link agains relocatable libstdc++
  • Loading branch information
TimNN committed Mar 21, 2017
commit 43a51b78b8c24f2bd40b20d1a082db1443075c19
9 changes: 7 additions & 2 deletions src/librustc_llvm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,21 @@ fn main() {
}
}

// OpenBSD has a particular C++ runtime library name
let llvm_static_stdcpp = env::var_os("LLVM_STATIC_STDCPP");

let stdcppname = if target.contains("openbsd") {
// OpenBSD has a particular C++ runtime library name
"estdc++"
} else if target.contains("netbsd") && llvm_static_stdcpp.is_some() {
// NetBSD uses a separate library when relocation is required
"stdc++_pic"
} else {
"stdc++"
};

// C++ runtime library
if !target.contains("msvc") {
if let Some(s) = env::var_os("LLVM_STATIC_STDCPP") {
if let Some(s) = llvm_static_stdcpp {
assert!(!cxxflags.contains("stdlib=libc++"));
let path = PathBuf::from(s);
println!("cargo:rustc-link-search=native={}",
Expand Down