From 7f933206d036b883f1434f65f3809a3a3d314196 Mon Sep 17 00:00:00 2001 From: Gilles Filippini <pini@debian.org> Date: Tue, 11 Apr 2023 02:11:07 +0200 Subject: [PATCH] build: use 'lto = thin' The 'thin' LTO profile takes way less time than the 'fat' one and is said to achieve similar performance gains. Move this setting into 'Cargo.toml' instead of setting the environment variable CARGO_PROFILE_RELEASE_LTO. --- Cargo.toml | 1 + docker/Dockerfile | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7033f0bdc..42515b104 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -205,6 +205,7 @@ yamux = { opt-level = 3 } zeroize = { opt-level = 3 } [profile.release] +lto = "thin" # Substrate runtime requires unwinding. panic = "unwind" diff --git a/docker/Dockerfile b/docker/Dockerfile index 3683f585c..9f96d0330 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -27,7 +27,6 @@ RUN apt-get update && \ # build duniter ARG debug=0 RUN if [ "$debug" = 0 ]; then \ - echo "CARGO_PROFILE_RELEASE_LTO=true; export CARGO_PROFILE_RELEASE_LTO" >>/root/dynenv && \ echo "CARGO_OPTIONS=--release" >>/root/dynenv && \ echo "TARGET_FOLDER=release" >>/root/dynenv; \ else \ -- GitLab