mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Rollup merge of #39481 - ishitatsuyuki:master, r=alexcrichton
liballoc_jemalloc: fix linking with system library Fix #39215
This commit is contained in:
commit
d021a3fd69
@ -41,6 +41,12 @@ fn main() {
|
|||||||
return;
|
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") {
|
if let Some(jemalloc) = env::var_os("JEMALLOC_OVERRIDE") {
|
||||||
let jemalloc = PathBuf::from(jemalloc);
|
let jemalloc = PathBuf::from(jemalloc);
|
||||||
println!("cargo:rustc-link-search=native={}",
|
println!("cargo:rustc-link-search=native={}",
|
||||||
@ -66,11 +72,6 @@ fn main() {
|
|||||||
println!("cargo:rustc-link-lib=static=jemalloc_pic");
|
println!("cargo:rustc-link-lib=static=jemalloc_pic");
|
||||||
}
|
}
|
||||||
println!("cargo:rustc-link-search=native={}/lib", build_dir.display());
|
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");
|
let src_dir = env::current_dir().unwrap().join("../jemalloc");
|
||||||
rerun_if_changed_anything_in_dir(&src_dir);
|
rerun_if_changed_anything_in_dir(&src_dir);
|
||||||
let timestamp = build_dir.join("rustbuild.timestamp");
|
let timestamp = build_dir.join("rustbuild.timestamp");
|
||||||
|
Loading…
Reference in New Issue
Block a user