diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-01-19 11:13:42 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-19 11:13:42 -0800 |
| commit | 10893a9a349cdd423f2490a6984acb5b3b7c8046 (patch) | |
| tree | 106134ecd115ef74c6d4994e50fb34e60eed083c /src/librustc_llvm | |
| parent | ad78c04a9a0abd5b2332b5046060f16edef2b05b (diff) | |
| parent | 5466c1bc80ad7cf08d71e77e7af3d17a24b50f36 (diff) | |
| download | rust-1.15.0.tar.gz rust-1.15.0.zip | |
Merge pull request #39189 from brson/beta-next 1.15.0
Beta next
Diffstat (limited to 'src/librustc_llvm')
| -rw-r--r-- | src/librustc_llvm/build.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs index 50bc3e7b624..86c40a0208a 100644 --- a/src/librustc_llvm/build.rs +++ b/src/librustc_llvm/build.rs @@ -230,6 +230,13 @@ fn main() { } } + // OpenBSD has a particular C++ runtime library name + let stdcppname = if target.contains("openbsd") { + "estdc++" + } else { + "stdc++" + }; + // C++ runtime library if !target.contains("msvc") { if let Some(s) = env::var_os("LLVM_STATIC_STDCPP") { @@ -237,11 +244,11 @@ fn main() { let path = PathBuf::from(s); println!("cargo:rustc-link-search=native={}", path.parent().unwrap().display()); - println!("cargo:rustc-link-lib=static=stdc++"); + println!("cargo:rustc-link-lib=static={}", stdcppname); } else if cxxflags.contains("stdlib=libc++") { println!("cargo:rustc-link-lib=c++"); } else { - println!("cargo:rustc-link-lib=stdc++"); + println!("cargo:rustc-link-lib={}", stdcppname); } } } |
