From 2c8eb1604e54ee9aeceec407f436cab8ed082987 Mon Sep 17 00:00:00 2001 From: Michal Strug Date: Tue, 5 Nov 2024 22:01:17 +0100 Subject: [PATCH] Updated tcmalloc build --- Dockerfile | 7 ++----- crates/alloc/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index b6cc85be58..69c2a7a0d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,10 +7,7 @@ WORKDIR /src/ # Install dependencies RUN --mount=type=cache,target=/var/cache/apt,sharing=locked apt-get update && \ - apt-get install -y git libssl-dev pkg-config make google-perftools - -# Workaround for missing library link -RUN ln -d /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4 /usr/lib/x86_64-linux-gnu/libtcmalloc.so + apt-get install -y git libssl-dev pkg-config make libgoogle-perftools-dev # Copy and Build Code COPY . . @@ -56,7 +53,7 @@ ENTRYPOINT [ "solvers" ] # Extract Binary FROM intermediate RUN apt-get update && \ - apt-get install -y build-essential cmake git zlib1g-dev libelf-dev libdw-dev libboost-dev libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libunwind-dev libzstd-dev git + apt-get install -y build-essential cmake git zlib1g-dev libelf-dev libdw-dev libboost-dev libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libunwind-dev libzstd-dev libgoogle-perftools4 RUN git clone https://invent.kde.org/sdk/heaptrack.git /heaptrack && \ mkdir /heaptrack/build && cd /heaptrack/build && \ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=OFF .. && \ diff --git a/crates/alloc/Cargo.toml b/crates/alloc/Cargo.toml index cb3b76e264..78baf088df 100644 --- a/crates/alloc/Cargo.toml +++ b/crates/alloc/Cargo.toml @@ -17,7 +17,7 @@ doctest = false workspace = true [features] -default = [ "allocator-jemalloc" ] +default = [ "allocator-tcmalloc" ] allocator-mimalloc = [ "dep:mimalloc" ] allocator-tcmalloc = [ "dep:tcmalloc" ] allocator-jemalloc = [ "dep:tikv-jemallocator" ]