github.com/wasilibs/nottinygc@v0.7.2-0.20240312114022-d59c9478ef51/buildtools/mimalloc/Dockerfile (about) 1 # Copyright wasilibs authors 2 # SPDX-License-Identifier: MIT 3 4 FROM ghcr.io/webassembly/wasi-sdk:wasi-sdk-20 5 6 RUN apt-get -y update && apt-get -y install curl 7 8 # Enables export of aligned_alloc 9 # TODO(anuraaga): It seems like this should be set automatically, consider debugging further. 10 ENV CFLAGS -O3 -D__USE_ISOC11 ${CFLAGS} 11 12 RUN mkdir -p /mimalloc && curl -L https://github.com/microsoft/mimalloc/archive/d1fff1119a52e15c1c3807efe1077024c39fe70e.tar.gz | tar -xz --strip-components 1 -C /mimalloc 13 WORKDIR /mimalloc 14 RUN mkdir -p out/release && cd out/release && cmake ../.. -DMI_BUILD_SHARED=off -DMI_BUILD_TESTS=off && make && ${RANLIB} libmimalloc.a 15 16 CMD ["cp", "./out/release/libmimalloc.a", "/out/libmimalloc.a"]