microsoft / mimalloc

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

mimalloc.o not available in vcpkg #907

Open muhammadhamzasajjad opened 4 weeks ago

muhammadhamzasajjad commented 4 weeks ago

According to the docs for static override we should do

> gcc -o myprogram mimalloc.o  myfile1.c ...

I am using mimalloc from vcpkg. But the mimalloc.o file is not built by the vcpkg configuration of mimalloc as the target mimalloc-obj is also not built. In fact, MIMALLOC_OBJECT_DIR is not available which is supposed to be used for obtaining mimalloc.o.

How can we use mimalloc.o in vcpkg? Ideally I would want to be able to access mimalloc.o via CMake and then link it with the target. #532 seems similar but vcpkg build process for mimalloc doesn't make mimalloc-obj target available.