rust: Avoid linking against libstdc++

All C++ code should link against libc++_shared to avoid mixing C++
standard library issues.

This fixes librustc_codegen_llvm-llvm.so to do that.
This commit is contained in:
Fredrik Fornwall 2019-05-07 22:17:42 +02:00
parent 264989a264
commit aaff27833d
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
diff -u -r ../rustc-1.34.1-src/src/librustc_llvm/build.rs ./src/librustc_llvm/build.rs
--- ../rustc-1.34.1-src/src/librustc_llvm/build.rs 2019-04-24 21:07:08.000000000 +0000
+++ ./src/librustc_llvm/build.rs 2019-05-05 20:56:34.090330174 +0000
@@ -244,6 +244,8 @@
"c++"
} else if target.contains("darwin") {
"c++"
+ } else if target.contains("android") {
+ "c++_shared"
} else if target.contains("netbsd") && llvm_static_stdcpp.is_some() {
// NetBSD uses a separate library when relocation is required
"stdc++_pic"