From 5a4475c0a4fb90cb2f96cef9b48d7c4fd65e67c4 Mon Sep 17 00:00:00 2001 From: Tim Neumann Date: Thu, 13 Apr 2017 22:27:53 +0200 Subject: [PATCH] FIN: windows-gnu: statically link gcc_s, pthread with llvm --- src/librustc_llvm/build.rs | 4 ++++ src/librustc_llvm/lib.rs | 1 + 2 files changed, 5 insertions(+) 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]