diff options
| author | Vadim Chugunov <vadimcn@gmail.com> | 2017-03-24 11:01:45 -0700 |
|---|---|---|
| committer | Vadim Chugunov <vadimcn@gmail.com> | 2017-03-30 16:31:46 -0700 |
| commit | 7c2fc62a47a9e7e6c71492d5b3752ab78cf0af0d (patch) | |
| tree | a8258c4b581d97dce794412f479af325da24f0c0 | |
| parent | 78c3a49044d2f93a008f5e8040a27445c8d2f58c (diff) | |
| download | rust-7c2fc62a47a9e7e6c71492d5b3752ab78cf0af0d.tar.gz rust-7c2fc62a47a9e7e6c71492d5b3752ab78cf0af0d.zip | |
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.
| -rw-r--r-- | src/libunwind/build.rs | 3 | ||||
| -rw-r--r-- | src/libunwind/lib.rs | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs index ed3d5212bf2..9b8099d55a0 100644 --- a/src/libunwind/build.rs +++ b/src/libunwind/build.rs @@ -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"); } diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs index 7fa2ce650fd..d4d52322ada 100644 --- a/src/libunwind/lib.rs +++ b/src/libunwind/lib.rs @@ -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))] |
