From 4bc458486842af4b5647abafd3798d184efab82e Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 19 Sep 2021 09:30:32 +0400 Subject: [PATCH] Build glibmm with LTO In combination with https://github.com/desktop-app/cmake_helpers/pull/126 gets rid of unused glib symbols --- Telegram/build/docker/centos_env/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Telegram/build/docker/centos_env/Dockerfile b/Telegram/build/docker/centos_env/Dockerfile index 4df85dee9..a0d636fc5 100644 --- a/Telegram/build/docker/centos_env/Dockerfile +++ b/Telegram/build/docker/centos_env/Dockerfile @@ -646,7 +646,11 @@ WORKDIR glibmm RUN git apply ../patches/glibmm.patch ENV ACLOCAL_PATH="/usr/local/share/aclocal" RUN NOCONFIGURE=1 ./autogen.sh -RUN ./configure --enable-maintainer-mode --enable-static --disable-documentation +RUN CC=\"gcc -flto\" CXX=\"g++ -flto\" AR=gcc-ar RANLIB=gcc-ranlib ./configure \ + --enable-maintainer-mode \ + --enable-static \ + --disable-documentation + RUN make -j$(nproc) RUN make DESTDIR="$LibrariesPath/glibmm-cache" install