libgcc_eh may depend on libpthread.

Make sure we link to the static libpthread, so that compiled Rust binaries do not depend on winpthread1.dll.
This commit is contained in:
Vadim Chugunov 2017-03-24 11:01:45 -07:00
parent 78c3a49044
commit 7c2fc62a47
2 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,8 @@ fn main() {
} else if target.contains("dragonfly") {
println!("cargo:rustc-link-lib=gcc_pic");
} else if target.contains("windows-gnu") {
println!("cargo:rustc-link-lib=gcc_eh");
println!("cargo:rustc-link-lib=static-nobundle=gcc_eh");
println!("cargo:rustc-link-lib=static-nobundle=pthread");
} else if target.contains("fuchsia") {
println!("cargo:rustc-link-lib=unwind");
}

View File

@ -17,6 +17,7 @@
#![feature(cfg_target_vendor)]
#![feature(staged_api)]
#![feature(unwind_attributes)]
#![feature(static_nobundle)]
#![cfg_attr(not(target_env = "msvc"), feature(libc))]