Make liballoc_jemalloc work on CloudABI.
The automated builds for CloudABI in dist-various-2 don't use --disable-jemalloc, even though my original container image did. Instead of setting that flag, let's go the extra mile of making jemalloc work. CloudABI's C library already uses jemalloc and now exposes the API extensions used by us.
This commit is contained in:
parent
3bd4af88be
commit
66d53ca9e5
@ -29,13 +29,20 @@ fn main() {
|
|||||||
// for targets like emscripten, even if we don't use it.
|
// for targets like emscripten, even if we don't use it.
|
||||||
let target = env::var("TARGET").expect("TARGET was not set");
|
let target = env::var("TARGET").expect("TARGET was not set");
|
||||||
let host = env::var("HOST").expect("HOST was not set");
|
let host = env::var("HOST").expect("HOST was not set");
|
||||||
if target.contains("bitrig") || target.contains("cloudabi") || target.contains("emscripten") ||
|
if target.contains("bitrig") || target.contains("emscripten") || target.contains("fuchsia") ||
|
||||||
target.contains("fuchsia") || target.contains("msvc") || target.contains("openbsd") ||
|
target.contains("msvc") || target.contains("openbsd") || target.contains("redox") ||
|
||||||
target.contains("redox") || target.contains("rumprun") || target.contains("wasm32") {
|
target.contains("rumprun") || target.contains("wasm32") {
|
||||||
println!("cargo:rustc-cfg=dummy_jemalloc");
|
println!("cargo:rustc-cfg=dummy_jemalloc");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CloudABI ships with a copy of jemalloc that has been patched to
|
||||||
|
// work well with sandboxing. Don't attempt to build our own copy,
|
||||||
|
// as it won't build.
|
||||||
|
if target.contains("cloudabi") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if target.contains("android") {
|
if target.contains("android") {
|
||||||
println!("cargo:rustc-link-lib=gcc");
|
println!("cargo:rustc-link-lib=gcc");
|
||||||
} else if !target.contains("windows") && !target.contains("musl") {
|
} else if !target.contains("windows") && !target.contains("musl") {
|
||||||
|
Loading…
Reference in New Issue
Block a user