Add jemalloc support
Prerequisite of !616
Test Plan
D6343:
cmake -GNinja .. -DUSE_JEMALLOC_EXPERIMENTAL=ON -DCMAKE_C_FLAGS=-Werror
Check that you get no build failure.
D6055 / D6027:
cmake -GNinja .. -DUSE_JEMALLOC_EXPERIMENTAL=ON
On Debian, check in the cmake output that libdl is required.
ninja all check
cmake -GNinja .. -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux64.cmake -DUSE_JEMALLOC_EXPERIMENTAL=ON
Check in the cmake output that libdl is NOT required.
D6038: Obtain the MacOS10.14.sdk.tar.xz that as described in doc/gitian-building.md Build all dependencies:
cd depends
mkdir SDKs
tar -C SDKs -xf /path/to/MacOS10.14.sdk.tar.xz
make build-all
Check that the 'build-all' completes successfully (no error). Then cross build for all platforms with jemalloc enabled - save the following to a script file and run it in the base folder of your working area.
#!/bin/bash
for platform in Linux32 Linux64 LinuxAArch64 LinuxARM OSX Win64
do
rm -rf build_${platform}
mkdir build_${platform}
cd build_${platform}
# Need to disable seeder build on Windows
SEEDER="" && [[ ${platform} = "Win64" ]] && SEEDER="-DBUILD_BITCOIN_SEEDER=OFF"
cmake -GNinja .. -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/${platform}.cmake -DUSE_JEMALLOC_EXPERIMENTAL=ON ${SEEDER}
ninja all || {
echo "Failed to build ${platform}."
exit 1
}
cd ..
done
Check that this does not exit with a failure. You'll need to collect the resulting binaries and run them on various platforms.
Gitian build: Perform a gitian build for all platforms (Linux, Win, MacOS). All builds should work. Test that the resulting binaries run.
Merge instructions: DO NOT SQUASH
Tags for admin - do not delete:
Differential Revision: https://reviews.bitcoinabc.org/D6027 Differential Revision: https://reviews.bitcoinabc.org/D6038 Differential Revision: https://reviews.bitcoinabc.org/D6055 Differential Revision: https://reviews.bitcoinabc.org/D6343