diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs index 7d5887e699fd7..7ef9031734a71 100644 --- a/src/librustc_llvm/build.rs +++ b/src/librustc_llvm/build.rs @@ -265,4 +265,8 @@ fn main() { if target.contains("windows") { println!("cargo:rustc-link-lib=ole32"); } + if target.contains("windows-gnu") { + println!("cargo:rustc-link-lib=static-nobundle=gcc_s"); + println!("cargo:rustc-link-lib=static-nobundle=pthread"); + } } diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index f300bf16145a7..7c52ceae459cd 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -29,6 +29,7 @@ #![feature(link_args)] #![feature(staged_api)] #![feature(rustc_private)] +#![feature(static_nobundle)] extern crate libc; #[macro_use]