about summary refs log tree commit diff
path: root/src/liballoc_jemalloc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-02-05 19:33:55 +0000
committerbors <bors@rust-lang.org>2017-02-05 19:33:55 +0000
commit031c1168b9b3f38405090f6be678a156b7d71e12 (patch)
tree38656a85859d0f1a9864ab07b3865b34b3bd4162 /src/liballoc_jemalloc
parentfc02736d59252fe408dd6c2f7e2c4b6f229e4443 (diff)
parenta419dd1c013846754c0a3c8dae3842c2739864d4 (diff)
downloadrust-031c1168b9b3f38405090f6be678a156b7d71e12.tar.gz
rust-031c1168b9b3f38405090f6be678a156b7d71e12.zip
Auto merge of #39567 - frewsxcv:rollup, r=frewsxcv
Rollup of 12 pull requests

- Successful merges: #39439, #39472, #39481, #39491, #39501, #39509, #39514, #39519, #39526, #39528, #39530, #39538
- Failed merges:
Diffstat (limited to 'src/liballoc_jemalloc')
-rw-r--r--src/liballoc_jemalloc/build.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/liballoc_jemalloc/build.rs b/src/liballoc_jemalloc/build.rs
index 7e616c0ff27..cb7852995f3 100644
--- a/src/liballoc_jemalloc/build.rs
+++ b/src/liballoc_jemalloc/build.rs
@@ -41,6 +41,12 @@ fn main() {
         return;
     }
 
+    if target.contains("android") {
+        println!("cargo:rustc-link-lib=gcc");
+    } else if !target.contains("windows") && !target.contains("musl") {
+        println!("cargo:rustc-link-lib=pthread");
+    }
+
     if let Some(jemalloc) = env::var_os("JEMALLOC_OVERRIDE") {
         let jemalloc = PathBuf::from(jemalloc);
         println!("cargo:rustc-link-search=native={}",
@@ -66,11 +72,6 @@ fn main() {
         println!("cargo:rustc-link-lib=static=jemalloc_pic");
     }
     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") {
-        println!("cargo:rustc-link-lib=pthread");
-    }
     let src_dir = env::current_dir().unwrap().join("../jemalloc");
     rerun_if_changed_anything_in_dir(&src_dir);
     let timestamp = build_dir.join("rustbuild.timestamp");