From 933f1944c7e93d9374c0071168cd0a0e072b7c59 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 2 Feb 2023 15:54:55 +0400 Subject: [PATCH] Strip binaries in snap --- snap/snapcraft.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 9ebd99fa1a..2994873e97 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -104,6 +104,7 @@ parts: parse-info: [usr/share/metainfo/org.telegram.desktop.metainfo.xml] build-environment: - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} + - LDFLAGS: -s build-packages: - clang - python3 @@ -255,6 +256,7 @@ parts: meson-parameters: - --buildtype=release - --prefix=/usr + - --strip - -Dbuild-documentation=false - -Dbuild-examples=false - -Dsigc++-3.0:build-documentation=false @@ -270,6 +272,8 @@ parts: source-depth: 1 source-tag: v0.7.0 plugin: cmake + build-environment: + - LDFLAGS: -s cmake-generator: Ninja cmake-parameters: - -DCMAKE_BUILD_TYPE=Release @@ -303,6 +307,8 @@ parts: source-depth: 1 source-tag: v4.0.3 plugin: cmake + build-environment: + - LDFLAGS: -s cmake-generator: Ninja cmake-parameters: - -DCMAKE_BUILD_TYPE=Release @@ -322,6 +328,8 @@ parts: source-depth: 1 source-tag: 1.22.2 plugin: cmake + build-environment: + - LDFLAGS: -s build-packages: - libasound2-dev - libdbus-1-dev @@ -350,6 +358,8 @@ parts: source-depth: 1 source-branch: OpenSSL_1_1_1-stable plugin: make + build-environment: + - LDFLAGS: -s override-build: | ./config \ shared \ @@ -371,6 +381,8 @@ parts: source-depth: 1 source-tag: v21.9 plugin: cmake + build-environment: + - LDFLAGS: -s build-packages: - zlib1g-dev stage-packages: @@ -390,6 +402,8 @@ parts: qt: plugin: nil + build-environment: + - LDFLAGS: -s build-packages: - libdbus-1-dev - libegl-dev @@ -521,6 +535,8 @@ parts: source-depth: 1 source-commit: 7f449bf8bd3b933891d12c30112268c4090e4d59 plugin: autotools + build-environment: + - CFLAGS: -O2 -s autotools-configure-parameters: - --prefix=/usr - --libdir=\${exec_prefix}/lib/$CRAFT_ARCH_TRIPLET @@ -539,6 +555,8 @@ parts: source-depth: 1 source-commit: 5098730b9eb6173f0b52068fe2555b7c1015123a plugin: cmake + build-environment: + - LDFLAGS: -s build-packages: - yasm - libdrm-dev