Skip to content

Commit

Permalink
libgcc_eh may depend on libpthread.
Browse files Browse the repository at this point in the history
Make sure we link to the static libpthread, so that compiled Rust binaries do not depend on winpthread1.dll.
  • Loading branch information
vadimcn committed Mar 30, 2017
1 parent 78c3a49 commit 7c2fc62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libunwind/build.rs
Expand Up @@ -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");
}
Expand Down
1 change: 1 addition & 0 deletions src/libunwind/lib.rs
Expand Up @@ -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))]

Expand Down

0 comments on commit 7c2fc62

Please sign in to comment.