diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-02-05 12:45:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-05 12:45:05 -0500 |
| commit | d021a3fd6938b9c149ee4ade0ecbfaa1d3b9f36b (patch) | |
| tree | 26e7de514a95f72ff58c9ef5a9b584d211da1134 /src/liballoc_jemalloc | |
| parent | ddd01e0d557b64a7e1b04a2aef26901eefcde3d8 (diff) | |
| parent | 7de99cdf698d6f9cd44333b6e147910621d47fe9 (diff) | |
| download | rust-d021a3fd6938b9c149ee4ade0ecbfaa1d3b9f36b.tar.gz rust-d021a3fd6938b9c149ee4ade0ecbfaa1d3b9f36b.zip | |
Rollup merge of #39481 - ishitatsuyuki:master, r=alexcrichton
liballoc_jemalloc: fix linking with system library Fix #39215
Diffstat (limited to 'src/liballoc_jemalloc')
| -rw-r--r-- | src/liballoc_jemalloc/build.rs | 11 |
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"); |
