diff options
| author | bors <bors@rust-lang.org> | 2016-04-05 10:55:38 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-04-05 10:55:38 -0700 |
| commit | 57e5d43c770201d837298175a2d55818867bdb33 (patch) | |
| tree | d2aff29aff613d9023bb26d7a8bc5b4ee3ee2ec7 /src/liballoc_jemalloc | |
| parent | 953c3b5f502437398711ca442be0a10ad575b667 (diff) | |
| parent | e8ab71fa00f2264f4587ca536e93b909a9358e27 (diff) | |
| download | rust-57e5d43c770201d837298175a2d55818867bdb33.tar.gz rust-57e5d43c770201d837298175a2d55818867bdb33.zip | |
Auto merge of #32743 - Manishearth:rollup, r=Manishearth
Rollup of 11 pull requests - Successful merges: #32403, #32596, #32675, #32678, #32685, #32686, #32692, #32710, #32712, #32714, #32715 - Failed merges: #32488
Diffstat (limited to 'src/liballoc_jemalloc')
| -rw-r--r-- | src/liballoc_jemalloc/build.rs | 2 | ||||
| -rw-r--r-- | src/liballoc_jemalloc/lib.rs | 19 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/liballoc_jemalloc/build.rs b/src/liballoc_jemalloc/build.rs index 9e2090c3246..5d521913b48 100644 --- a/src/liballoc_jemalloc/build.rs +++ b/src/liballoc_jemalloc/build.rs @@ -86,6 +86,8 @@ fn main() { // should be good to go! cmd.arg("--with-jemalloc-prefix=je_"); cmd.arg("--disable-tls"); + } else if target.contains("dragonfly") { + cmd.arg("--with-jemalloc-prefix=je_"); } if cfg!(feature = "debug-jemalloc") { diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs index c96d303e6bb..3a30bebec54 100644 --- a/src/liballoc_jemalloc/lib.rs +++ b/src/liballoc_jemalloc/lib.rs @@ -42,22 +42,27 @@ use libc::{c_int, c_void, size_t}; extern {} // Note that the symbols here are prefixed by default on OSX (we don't -// explicitly request it), and on Android we explicitly request it as -// unprefixing cause segfaults (mismatches in allocators). +// explicitly request it), and on Android and DragonFly we explicitly request +// it as unprefixing cause segfaults (mismatches in allocators). extern { - #[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"), + #[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios", + target_os = "dragonfly"), link_name = "je_mallocx")] fn mallocx(size: size_t, flags: c_int) -> *mut c_void; - #[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"), + #[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios", + target_os = "dragonfly"), link_name = "je_rallocx")] fn rallocx(ptr: *mut c_void, size: size_t, flags: c_int) -> *mut c_void; - #[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"), + #[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios", + target_os = "dragonfly"), link_name = "je_xallocx")] fn xallocx(ptr: *mut c_void, size: size_t, extra: size_t, flags: c_int) -> size_t; - #[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"), + #[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios", + target_os = "dragonfly"), link_name = "je_sdallocx")] fn sdallocx(ptr: *mut c_void, size: size_t, flags: c_int); - #[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"), + #[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios", + target_os = "dragonfly"), link_name = "je_nallocx")] fn nallocx(size: size_t, flags: c_int) -> size_t; } |
