Skip to content

Commit

Permalink
rust patch
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Nov 26, 2022
1 parent 2f19078 commit 3db7206
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions rust-libstdc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
index ac758c1..11abfac 100644
--- a/compiler/rustc_llvm/build.rs
+++ b/compiler/rustc_llvm/build.rs
@@ -347,18 +347,18 @@ fn main() {

// C++ runtime library
if !target.contains("msvc") {
- if let Some(s) = llvm_static_stdcpp {
- assert!(!cxxflags.contains("stdlib=libc++"));
- let path = PathBuf::from(s);
- println!("cargo:rustc-link-search=native={}", path.parent().unwrap().display());
- if target.contains("windows") {
- println!("cargo:rustc-link-lib=static:-bundle={}", stdcppname);
- } else {
- println!("cargo:rustc-link-lib=static={}", stdcppname);
- }
- } else if cxxflags.contains("stdlib=libc++") {
- println!("cargo:rustc-link-lib=c++");
- } else {
+ if let Some(_s) = llvm_static_stdcpp {
+ // assert!(!cxxflags.contains("stdlib=libc++"));
+ // let path = PathBuf::from(s);
+ // println!("cargo:rustc-link-search=native={}", path.parent().unwrap().display());
+ // if target.contains("windows") {
+ // println!("cargo:rustc-link-lib=static:-bundle={}", stdcppname);
+ // } else {
+ // 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={}", stdcppname);
}
}

0 comments on commit 3db7206

Please sign in to comment.