diff options
| author | bors <bors@rust-lang.org> | 2016-05-02 09:16:23 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-05-02 09:16:23 -0700 |
| commit | d80497e628945c3f11ff351030b4c62a8533e01e (patch) | |
| tree | d6506c5d97fa9d6b4285e30959a52ee83df684f3 /src/liballoc_jemalloc | |
| parent | 0eb575c702f56735d8bc6c3d76cb4d9bdeb13e84 (diff) | |
| parent | e8cbcef86e33b7d3ffeda9be8797eebaac3eac28 (diff) | |
| download | rust-d80497e628945c3f11ff351030b4c62a8533e01e.tar.gz rust-d80497e628945c3f11ff351030b4c62a8533e01e.zip | |
Auto merge of #33308 - ollie27:wingnu_jemalloc, r=alexcrichton
Fix alloc_jemalloc on windows gnu targets jemalloc prefixes the symbols by default on Windows so we need to account for that to avoid link errors such as: `undefined reference to 'mallocx'` when using alloc_jemalloc.
Diffstat (limited to 'src/liballoc_jemalloc')
| -rw-r--r-- | src/liballoc_jemalloc/lib.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs index 3a30bebec54..7651d91c06d 100644 --- a/src/liballoc_jemalloc/lib.rs +++ b/src/liballoc_jemalloc/lib.rs @@ -41,28 +41,28 @@ use libc::{c_int, c_void, size_t}; #[cfg(not(cargobuild))] extern {} -// Note that the symbols here are prefixed by default on OSX (we don't -// explicitly request it), and on Android and DragonFly we explicitly request -// it as unprefixing cause segfaults (mismatches in allocators). +// Note that the symbols here are prefixed by default on OSX and Windows (we +// don't 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", - target_os = "dragonfly"), + target_os = "dragonfly", target_os = "windows"), 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", - target_os = "dragonfly"), + target_os = "dragonfly", target_os = "windows"), 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", - target_os = "dragonfly"), + target_os = "dragonfly", target_os = "windows"), 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", - target_os = "dragonfly"), + target_os = "dragonfly", target_os = "windows"), 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", - target_os = "dragonfly"), + target_os = "dragonfly", target_os = "windows"), link_name = "je_nallocx")] fn nallocx(size: size_t, flags: c_int) -> size_t; } |
