EmbarkStudios / rpmalloc-rs

🐏 rpmalloc global memory allocator for Rust 🦀
http://embark.rs
Apache License 2.0
136 stars 14 forks source link

Link issue on Windows #4

Closed repi closed 5 years ago

repi commented 5 years ago

Currently running into some link issues with the malloc hooking which we should investigate and fix.

These are the link errors one gets. Happens both with LLD and MSVC's linker:

         lld-link: error: duplicate symbol: calloc in librpmalloc_sys-6320f0a329f3e257.rlib(rpmalloc.o) and in api-ms-win-crt-heap-l1-1-0.dll
         lld-link: error: duplicate symbol: free in librpmalloc_sys-6320f0a329f3e257.rlib(rpmalloc.o) and in api-ms-win-crt-heap-l1-1-0.dll
         lld-link: error: duplicate symbol: malloc in librpmalloc_sys-6320f0a329f3e257.rlib(rpmalloc.o) and in api-ms-win-crt-heap-l1-1-0.dll
         lld-link: error: duplicate symbol: realloc in librpmalloc_sys-6320f0a329f3e257.rlib(rpmalloc.o) and in api-ms-win-crt-heap-l1-1-0.dll
repi commented 5 years ago

Disabling ENABLE_OVERRIDE again solves this on Windows. Though on Mac we need to have it enabled otherwise we run into rpmalloc compile issues