build: use full and minimal jemalloc configurations

This commit is contained in:
Marcus Holland-Moritz 2025-05-21 23:04:46 +02:00 committed by mhx
parent 15b5706a90
commit bb55080759
2 changed files with 14 additions and 3 deletions

View File

@ -308,15 +308,18 @@ if [[ "-$BUILD_TYPE-" == *-static-* ]]; then
export LDFLAGS="${LDFLAGS} -lz"
fi
CMAKE_ARGS="${CMAKE_ARGS} -DSTATIC_BUILD_DO_NOT_USE=1 -DWITH_UNIVERSAL_BINARY=1 -DWITH_FUSE_EXTRACT_BINARY=1"
if [[ "$BUILD_TYPE" != *-minimal-* ]]; then
if [[ "$BUILD_TYPE" == *-minimal-* ]]; then
_jemallocprefix="/opt/static-libs/$COMPILER-jemalloc-minimal"
else
CMAKE_ARGS="${CMAKE_ARGS} -DWITH_PXATTR=1"
_jemallocprefix="/opt/static-libs/$COMPILER-jemalloc-full"
fi
if [[ "$BUILD_TYPE" == *-libressl-* ]]; then
_sslprefix="/opt/static-libs/$COMPILER-libressl"
else
_sslprefix="/opt/static-libs/$COMPILER-openssl"
fi
CMAKE_ARGS="${CMAKE_ARGS} -DSTATIC_BUILD_EXTRA_PREFIX=/opt/static-libs/$COMPILER;$_sslprefix"
CMAKE_ARGS="${CMAKE_ARGS} -DSTATIC_BUILD_EXTRA_PREFIX=/opt/static-libs/$COMPILER;$_sslprefix;$_jemallocprefix"
fi
INSTALLDIR="$HOME/install"

View File

@ -249,7 +249,15 @@ for COMPILER in $COMPILERS; do
curl https://gitlab.alpinelinux.org/alpine/aports/-/raw/abc0b4170e42e2a7d835e4490ecbae49e6f3d137/main/jemalloc/musl-exception-specification-errors.patch | patch -p1
curl https://gitlab.alpinelinux.org/alpine/aports/-/raw/abc0b4170e42e2a7d835e4490ecbae49e6f3d137/main/jemalloc/pkgconf.patch | patch -p1
./autogen.sh
./configure --prefix="$INSTALL_DIR" --localstatedir=/var --sysconfdir=/etc --with-lg-hugepage=21 --disable-stats --disable-prof --enable-static --disable-shared --disable-log --disable-debug
mkdir build-minimal
cd build-minimal
../configure --prefix="$INSTALL_DIR-jemalloc-minimal" --localstatedir=/var --sysconfdir=/etc --with-lg-hugepage=21 --disable-stats --disable-prof --enable-static --disable-shared --disable-log --disable-debug
make -j$(nproc)
make install
cd ..
mkdir build-full
cd build-full
../configure --prefix="$INSTALL_DIR-jemalloc-full" --localstatedir=/var --sysconfdir=/etc --with-lg-hugepage=21 --enable-stats --enable-prof --enable-static --disable-shared --disable-log --disable-debug
make -j$(nproc)
make install
fi