microsoft / mimalloc

mimalloc is a compact general purpose allocator with excellent performance.
MIT License
9.74k stars 791 forks source link

macOS: Fix linking statically #897

Closed madsmtm closed 1 month ago

madsmtm commented 1 month ago

__attribute__((constructor)) does not mark the symbol as used, so the linker ends up dead-stripping the symbol when linked statically.

Adding the used attribute fixes that.

daanx commented 1 month ago

Thanks so much!