Created
March 20, 2017 15:59
-
-
Save mati865/6fd83fd24bd17dc4639e03a8211bc319 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From b982d34e1e835a98d2ebacaaa48e6acc75390c0a Mon Sep 17 00:00:00 2001 | |
From: Mateusz Mikula <[email protected]> | |
Date: Sat, 18 Mar 2017 11:34:24 +0100 | |
Subject: [PATCH] add missing libs | |
--- | |
src/liballoc_jemalloc/build.rs | 2 +- | |
src/libpanic_unwind/gcc.rs | 1 + | |
src/librustc_llvm/ffi.rs | 1 + | |
src/libunwind/build.rs | 1 + | |
4 files changed, 4 insertions(+), 1 deletion(-) | |
diff --git a/src/liballoc_jemalloc/build.rs b/src/liballoc_jemalloc/build.rs | |
index 1143df0c63..356265876a 100644 | |
--- a/src/liballoc_jemalloc/build.rs | |
+++ b/src/liballoc_jemalloc/build.rs | |
@@ -178,7 +178,7 @@ fn main() { | |
println!("cargo:rustc-link-search=native={}/lib", build_dir.display()); | |
if target.contains("android") { | |
println!("cargo:rustc-link-lib=gcc"); | |
- } else if !target.contains("windows") && !target.contains("musl") { | |
+ } else if !target.contains("musl") { | |
println!("cargo:rustc-link-lib=pthread"); | |
} | |
diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs | |
index e8b3a9a42c..916d64d87b 100644 | |
--- a/src/libpanic_unwind/gcc.rs | |
+++ b/src/libpanic_unwind/gcc.rs | |
@@ -302,6 +302,7 @@ unsafe extern "C" fn rust_eh_unwind_resume(panic_ctx: *mut u8) -> ! { | |
#[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))] | |
pub mod eh_frame_registry { | |
#[link(name = "gcc_eh")] | |
+ #[link(name = "pthread")] | |
#[cfg(not(cargobuild))] | |
extern "C" {} | |
diff --git a/src/librustc_llvm/ffi.rs b/src/librustc_llvm/ffi.rs | |
index caa2740408..52738a47f7 100644 | |
--- a/src/librustc_llvm/ffi.rs | |
+++ b/src/librustc_llvm/ffi.rs | |
@@ -1658,4 +1658,5 @@ extern "C" { | |
// during llvm-config? | |
#[cfg(windows)] | |
#[link(name = "ole32")] | |
+#[link(name = "ffi")] | |
extern "C" {} | |
diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs | |
index db41a368a1..83bbae2f84 100644 | |
--- a/src/libunwind/build.rs | |
+++ b/src/libunwind/build.rs | |
@@ -35,6 +35,7 @@ fn main() { | |
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=pthread"); | |
} else if target.contains("fuchsia") { | |
println!("cargo:rustc-link-lib=unwind"); | |
} | |
-- | |
2.12.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment